[Netadm-devel] gwc/pf Makefile,1.5,1.6 pf.c,1.9,1.10 pf.h,1.5,1.6 sysktimer.c,1.4,1.5 sysktimer.h,1.
Status: Beta
Brought to you by:
linuxpark
From: linuxpark <lin...@us...> - 2006-05-09 00:47:21
|
Update of /cvsroot/netadm/gwc/pf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30930 Modified Files: Makefile pf.c pf.h sysktimer.c sysktimer.h Log Message: MOD: replace printk to gwc_printk for more leveling our gwc log to /usr/local/gwc/log each will be save as their name gwc_pf.log, gwc_ksys.log. Index: sysktimer.h =================================================================== RCS file: /cvsroot/netadm/gwc/pf/sysktimer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sysktimer.h 18 Mar 2006 17:45:41 -0000 1.4 --- sysktimer.h 6 May 2006 15:21:07 -0000 1.5 *************** *** 1,7 **** ! /* ! * filename : sysktimer.h ! * 2006. 02. 28. (thu) 08:39:39 KST ! * jeho park <lin...@us...> ! */ #include <linux/init.h> #include <linux/module.h> --- 1,11 ---- ! /* ! Title : sysktimer.h ! Author : Jeho-Park <de...@sk...> ! Created date : 2006. 05. 05. (Fri) 18:09:07 KST ! Description : header of sysktimer in gwc modules ! ! */ ! #ident "@(#) $Header$" ! #include <linux/init.h> #include <linux/module.h> Index: pf.h =================================================================== RCS file: /cvsroot/netadm/gwc/pf/pf.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pf.h 18 Mar 2006 17:45:41 -0000 1.5 --- pf.h 6 May 2006 15:21:07 -0000 1.6 *************** *** 1,5 **** /* Title : pf.h ! Author : Jeho-Park <lin...@us...> Created date : 2006. 01. 31. (thu) 01:39:30 KST Description : --- 1,5 ---- /* Title : pf.h ! Author : Jeho-Park <de...@sk...> Created date : 2006. 01. 31. (thu) 01:39:30 KST Description : *************** *** 12,15 **** --- 12,16 ---- #include <linux/udp.h> #include <linux/types.h> + #include "sysklog.h" #if !defined(PFINFO) *************** *** 126,130 **** __u32 daddr, __u16 dport) { ! printk ("%s: %s %u.%u.%u.%u/%d -- %s --> %u.%u.%u.%u/%d\n", DEVICE_NAME, str, --- 127,131 ---- __u32 daddr, __u16 dport) { ! gwc_printk (GWC_PF_IDX, "%s: %s %u.%u.%u.%u/%d -- %s --> %u.%u.%u.%u/%d\n", DEVICE_NAME, str, *************** *** 139,152 **** dump_tcp(struct sk_buff *skb) { ! const struct iphdr *ip = skb->nh.iph; ! struct tcphdr *tcp; ! tcp = (struct tcphdr *) ((__u32 *) ip + ip->ihl); ! printk("%s: src(%u.%u.%u.%u/%hu)->dst(%u.%u.%u.%u/%hu)," "key.tos(0x%2.2hX)\n", DEVICE_NAME, NIPQUAD(ip->saddr), ntohs(tcp->source), NIPQUAD(ip->daddr), ntohs(tcp->dest), ip->tos); ! return 0; } --- 140,153 ---- dump_tcp(struct sk_buff *skb) { ! const struct iphdr *ip = skb->nh.iph; ! struct tcphdr *tcp; ! tcp = (struct tcphdr *) ((__u32 *) ip + ip->ihl); ! gwc_printk (GWC_PF_IDX, "%s: src(%u.%u.%u.%u/%hu)->dst(%u.%u.%u.%u/%hu)," "key.tos(0x%2.2hX)\n", DEVICE_NAME, NIPQUAD(ip->saddr), ntohs(tcp->source), NIPQUAD(ip->daddr), ntohs(tcp->dest), ip->tos); ! return 0; } *************** *** 154,165 **** dump_udp(struct sk_buff *skb) { ! const struct iphdr *ip = skb->nh.iph; ! struct udphdr *uh = (struct udphdr *) ((char *) ip + ip->ihl * 4); ! printk("%s: src(%u.%u.%u.%u/%hu)->dst(%u.%u.%u.%u/%hu)\n", DEVICE_NAME, NIPQUAD(ip->saddr), ntohs(uh->source), NIPQUAD(ip->daddr), ntohs(uh->dest)); ! return 0; } --- 155,166 ---- dump_udp(struct sk_buff *skb) { ! const struct iphdr *ip = skb->nh.iph; ! struct udphdr *uh = (struct udphdr *) ((char *) ip + ip->ihl * 4); ! gwc_printk (GWC_PF_IDX, "%s: src(%u.%u.%u.%u/%hu)->dst(%u.%u.%u.%u/%hu)\n", DEVICE_NAME, NIPQUAD(ip->saddr), ntohs(uh->source), NIPQUAD(ip->daddr), ntohs(uh->dest)); ! return 0; } *************** *** 173,180 **** print_MAC(unsigned char *p) { ! int i; ! for (i = 0; i < ETH_ALEN; i++, p++) ! printk("%02x%c", *p, i == ETH_ALEN - 1 ? ' ' : ':'); } --- 174,181 ---- print_MAC(unsigned char *p) { ! int i; ! for (i = 0; i < ETH_ALEN; i++, p++) ! gwc_printk (GWC_PF_IDX, "%02x%c", *p, i == ETH_ALEN - 1 ? ' ' : ':'); } *************** *** 182,197 **** sprint_MAC(char *buf, unsigned char *p) { ! int i; ! int n = 0; ! for (i = 0; i < ETH_ALEN; i++, p++) ! n += sprintf(buf + n, "%02x%c", *p, ! i == ETH_ALEN - 1 ? ' ' : ':'); ! } ! #define dprintk( fmt, args... ) do { \ ! if ( debug ) \ ! printk("%s: [%s:%d] " fmt, \ ! DEVICE_NAME, __FUNCTION__, __LINE__, ##args); \ ! } while(0) ! #endif /* __ASRV_PFILTER_H */ --- 183,193 ---- sprint_MAC(char *buf, unsigned char *p) { ! int i; ! int n = 0; ! for (i = 0; i < ETH_ALEN; i++, p++) ! n += sprintf(buf + n, "%02x%c", *p, ! i == ETH_ALEN - 1 ? ' ' : ':'); ! } ! #endif /* __SYS_PF_H */ Index: pf.c =================================================================== RCS file: /cvsroot/netadm/gwc/pf/pf.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pf.c 13 Apr 2006 14:01:45 -0000 1.9 --- pf.c 6 May 2006 15:21:07 -0000 1.10 *************** *** 1,5 **** /* Title : pf.c ! Author : Jeho-Park <lin...@us...> Created date : 2006. 01. 31. (thu) 01:39:30 KST Description : pf module --- 1,5 ---- /* Title : pf.c ! Author : Jeho-Park <de...@sk...> Created date : 2006. 01. 31. (thu) 01:39:30 KST Description : pf module *************** *** 45,57 **** #include "../include/global.h" #include "../include/sysdef.h" #include "pf.h" #include "sysktimer.h" ! #define DRIVER_AUTHOR "jeho park <lin...@gm...>" #define DRIVER_VERSION "gwc-pf-" SZSYSVERSION #define DRIVER_DESC "pf of gwc in netadm project " DRIVER_VERSION static pid_t tid; /* timer thread id */ static sysktimer_t *pf_ktimer = NULL; - static int debug __initdata = 0; static int kuio_rdopen = 0; static int kuio_wdopen = 0; --- 45,61 ---- #include "../include/global.h" #include "../include/sysdef.h" + #include "sysklog.h" #include "pf.h" #include "sysktimer.h" ! ! #define DRIVER_AUTHOR "jeho park <de...@sk...>" #define DRIVER_VERSION "gwc-pf-" SZSYSVERSION #define DRIVER_DESC "pf of gwc in netadm project " DRIVER_VERSION + static unsigned long debug = DBG_GENERAL; + module_param(debug, ulong, 0644); + MODULE_PARM_DESC(debug, "debug bitmap"); static pid_t tid; /* timer thread id */ static sysktimer_t *pf_ktimer = NULL; static int kuio_rdopen = 0; static int kuio_wdopen = 0; *************** *** 107,116 **** spin_unlock(&blk_hash_table[hash].lock); *blkhp = blkh; ! printk("%s: We meet any collision\n", DEVICE_NAME); return -1; } chain_length++; ! printk("%s: chain length(%d)\n", DEVICE_NAME, chain_length); blkhp = &blkh->next; } --- 111,120 ---- spin_unlock(&blk_hash_table[hash].lock); *blkhp = blkh; ! gwc_printk(GWC_KSYS_IDX, "%s: We meet any collision\n", DEVICE_NAME); return -1; } chain_length++; ! gwc_printk(GWC_KSYS_IDX, "%s: chain length(%d)\n", DEVICE_NAME, chain_length); blkhp = &blkh->next; } *************** *** 126,130 **** blknode = kmem_cache_alloc(kmem_cachep, in_interrupt()? SLAB_ATOMIC:SLAB_KERNEL); if (!blknode) { ! printk("%s: Failed to alloc blk from cache mem\n", DEVICE_NAME); return NULL; } --- 130,134 ---- blknode = kmem_cache_alloc(kmem_cachep, in_interrupt()? SLAB_ATOMIC:SLAB_KERNEL); if (!blknode) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to alloc blk from cache mem\n", DEVICE_NAME); return NULL; } *************** *** 144,148 **** while( (blkh = *blkhp) != NULL){ blkhp = &blkh->next; ! printk("kmem_cache_free\n"); kmem_cache_free(kmem_cachep, blkh); } --- 148,152 ---- while( (blkh = *blkhp) != NULL){ blkhp = &blkh->next; ! gwc_printk(GWC_KSYS_IDX, "kmem_cache_free\n"); kmem_cache_free(kmem_cachep, blkh); } *************** *** 151,158 **** if ( kmem_cache_destroy(kmem_cachep) ) { ! printk ("%s: Failed to destroy cache memory\n", DEVICE_NAME); return -1; } else { ! printk ("%s: Success to destroy cache memory\n", DEVICE_NAME); } return 1; --- 155,162 ---- if ( kmem_cache_destroy(kmem_cachep) ) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to destroy cache memory\n", DEVICE_NAME); return -1; } else { ! gwc_printk(GWC_KSYS_IDX, "%s: Success to destroy cache memory\n", DEVICE_NAME); } return 1; *************** *** 184,188 **** key_hp = blk_alloc(); if(!key_hp) { ! printk("%s : %s Failed to blk_alloc\n", DEVICE_NAME, __FUNCTION__ ); return -1; } --- 188,192 ---- key_hp = blk_alloc(); if(!key_hp) { ! gwc_printk(GWC_KSYS_IDX, "%s : %s Failed to blk_alloc\n", DEVICE_NAME, __FUNCTION__ ); return -1; } *************** *** 225,229 **** if (!blkh) { spin_unlock(&blk_hash_table[hash].lock); ! print_connection ("There is no such info", p->saddr, p->sport, p->protocol, --- 229,233 ---- if (!blkh) { spin_unlock(&blk_hash_table[hash].lock); ! print_connection ( "There is no such info", p->saddr, p->sport, p->protocol, *************** *** 262,269 **** 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if(!kmem_cachep){ ! printk("%s: Failed to allocate block_host_cache\n", DEVICE_NAME); if (kmem_cache_destroy(kmem_cachep)) ! printk("%s: Not all blk_hash's were freed\n", DEVICE_NAME); return -1; --- 266,273 ---- 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if(!kmem_cachep){ ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to allocate block_host_cache\n", DEVICE_NAME); if (kmem_cache_destroy(kmem_cachep)) ! gwc_printk(GWC_KSYS_IDX, "%s: Not all blk_hash's were freed\n", DEVICE_NAME); return -1; *************** *** 284,294 **** }while( blk_hash_table==NULL && --order > 0 ); ! printk("%s: num_physpages (%ld) PAGE_SHIFT (%d) goal(%d) blk_hash_mask(%x)\n", DEVICE_NAME, num_physpages, PAGE_SHIFT, goal, blk_hash_mask); if(!blk_hash_table) { ! printk("%s: Failed to alloc blk hash table\n",DEVICE_NAME); } else { ! printk("%s: blk_hash_table of %u buckets, %ldKbytes\n", DEVICE_NAME, blk_hash_mask, (long)(blk_hash_mask * sizeof(struct blk_hash_bucket))/1024); --- 288,298 ---- }while( blk_hash_table==NULL && --order > 0 ); ! gwc_printk(GWC_KSYS_IDX, "%s: num_physpages (%ld) PAGE_SHIFT (%d) goal(%d) blk_hash_mask(%x)\n", DEVICE_NAME, num_physpages, PAGE_SHIFT, goal, blk_hash_mask); if(!blk_hash_table) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to alloc blk hash table\n",DEVICE_NAME); } else { ! gwc_printk(GWC_KSYS_IDX, "%s: blk_hash_table of %u buckets, %ldKbytes\n", DEVICE_NAME, blk_hash_mask, (long)(blk_hash_mask * sizeof(struct blk_hash_bucket))/1024); *************** *** 301,305 **** } ! printk("%s: Success to initialize blk hash table \n",DEVICE_NAME); return 1; } --- 305,309 ---- } ! gwc_printk(GWC_KSYS_IDX, "%s: Success to initialize blk hash table \n",DEVICE_NAME); return 1; } *************** *** 430,439 **** { ! printk("%s: Device open (%d, %d)\n", KUIO_DEVICE_NAME, MAJOR(inode->i_rdev), MINOR(inode->i_rdev)); if ((filp->f_flags & O_ACCMODE) & (O_WRONLY | O_RDWR)) { ! if (kuio_wdopen) { ! printk("%s: Device already open for writing\n", KUIO_DEVICE_NAME); return -EBUSY; } else --- 434,444 ---- { ! gwc_printk(GWC_KSYS_IDX, "%s: Device open (%d, %d)\n", KUIO_DEVICE_NAME, MAJOR(inode->i_rdev), MINOR(inode->i_rdev)); if ((filp->f_flags & O_ACCMODE) & (O_WRONLY | O_RDWR)) { ! ! if (kuio_wdopen) { ! gwc_printk(GWC_KSYS_IDX, "%s: Device already open for writing\n", KUIO_DEVICE_NAME); return -EBUSY; } else *************** *** 442,446 **** else { if (kuio_rdopen) { ! printk("%s: Device already open for reading\n", KUIO_DEVICE_NAME); return -EBUSY; } else --- 447,451 ---- else { if (kuio_rdopen) { ! gwc_printk(GWC_KSYS_IDX, "%s: Device already open for reading\n", KUIO_DEVICE_NAME); return -EBUSY; } else *************** *** 456,460 **** { ! printk("%s: Device release (%d, %d)\n", KUIO_DEVICE_NAME, MAJOR(inode->i_rdev), MINOR(inode->i_rdev)); --- 461,465 ---- { ! gwc_printk(GWC_KSYS_IDX, "%s: Device release (%d, %d)\n", KUIO_DEVICE_NAME, MAJOR(inode->i_rdev), MINOR(inode->i_rdev)); *************** *** 569,572 **** --- 574,578 ---- }; + static int init_kuio(void) *************** *** 574,586 **** int ret; ! printk("%s: Loading kernel vs user IO module ... \n", KUIO_DEVICE_NAME); if ((ret = register_chrdev(KUIO_MAJOR_NUM, KUIO_DEVICE_NAME,&device_fops)) < 0) { ! printk("%s: Registration failed (%d)\n", KUIO_DEVICE_NAME, ret); return ret; } ! printk("%s: Registered with major Number = %d\n", KUIO_DEVICE_NAME, KUIO_MAJOR_NUM); return 0; } --- 580,592 ---- int ret; ! gwc_printk(GWC_KSYS_IDX, "%s: Loading kernel vs user IO module ... \n", KUIO_DEVICE_NAME); if ((ret = register_chrdev(KUIO_MAJOR_NUM, KUIO_DEVICE_NAME,&device_fops)) < 0) { ! gwc_printk(GWC_KSYS_IDX, "%s: Registration failed (%d)\n", KUIO_DEVICE_NAME, ret); return ret; } ! gwc_printk(GWC_KSYS_IDX, "%s: Registered with major Number = %d\n", KUIO_DEVICE_NAME, KUIO_MAJOR_NUM); return 0; } *************** *** 591,597 **** int ret; ! printk("%s: Unloading kernel vs user I/O module ...\n", KUIO_DEVICE_NAME); if ((ret = unregister_chrdev(KUIO_MAJOR_NUM, DEVICE_NAME)) < 0) ! printk("%s: Device unregistration failed (%d)\n", KUIO_DEVICE_NAME, ret); } --- 597,603 ---- int ret; ! gwc_printk(GWC_KSYS_IDX, "%s: Unloading kernel vs user I/O module ...\n", KUIO_DEVICE_NAME); if ((ret = unregister_chrdev(KUIO_MAJOR_NUM, DEVICE_NAME)) < 0) ! gwc_printk(GWC_KSYS_IDX, "%s: Device unregistration failed (%d)\n", KUIO_DEVICE_NAME, ret); } *************** *** 599,603 **** init_pf(void) { ! printk("%s: Register nfhook ...\n", DEVICE_NAME); iphook_tab.hook = ip_hook_func; iphook_tab.hooknum = NF_IP_PRE_ROUTING; --- 605,609 ---- init_pf(void) { ! gwc_printk(GWC_KSYS_IDX, "%s: Register nfhook ...\n", DEVICE_NAME); iphook_tab.hook = ip_hook_func; iphook_tab.hooknum = NF_IP_PRE_ROUTING; *************** *** 612,616 **** exit_pf(void) { ! printk("%s: Unregister nfhook modules...\n", DEVICE_NAME); nf_unregister_hook(&iphook_tab); return 0; --- 618,622 ---- exit_pf(void) { ! gwc_printk(GWC_KSYS_IDX, "%s: Unregister nfhook modules...\n", DEVICE_NAME); nf_unregister_hook(&iphook_tab); return 0; *************** *** 621,625 **** { ! printk("%s: Loading %s module ...\n", DEVICE_NAME, DEVICE_NAME); if ( init_blk_hash_table() < 0 ) { --- 627,631 ---- { ! gwc_printk(GWC_KSYS_IDX, "%s: Loading %s module ...\n", DEVICE_NAME, DEVICE_NAME); if ( init_blk_hash_table() < 0 ) { *************** *** 632,641 **** pf_ktimer = init_sysktimer (update_eat, NULL, 0, 0, 1000000000); if (!pf_ktimer) { ! printk("%s: Failed to init sysktimer\n", DEVICE_NAME); return 1; } if ((tid = register_sysktimer (pf_ktimer)) < 0 ) { ! printk("%s: Failed to register sysktimer\n", DEVICE_NAME); } --- 638,647 ---- pf_ktimer = init_sysktimer (update_eat, NULL, 0, 0, 1000000000); if (!pf_ktimer) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to init sysktimer\n", DEVICE_NAME); return 1; } if ((tid = register_sysktimer (pf_ktimer)) < 0 ) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to register sysktimer\n", DEVICE_NAME); } *************** *** 650,661 **** if ( tid > 1 && ((ret = unregister_sysktimer(tid, pf_ktimer))) < 0 ) { ! printk("%s: Failed to unregister timer (%d)\n", DEVICE_NAME, ret); } ! printk("%s: Unloading %s modules...\n", DEVICE_NAME, DEVICE_NAME); exit_pf(); if ( free_blk_hash_table() < 0 ) { ! printk ("%s: Failed to free all resources\n", DEVICE_NAME); } exit_kuio(); --- 656,667 ---- if ( tid > 1 && ((ret = unregister_sysktimer(tid, pf_ktimer))) < 0 ) { ! gwc_printk(GWC_KSYS_IDX, "%s: Failed to unregister timer (%d)\n", DEVICE_NAME, ret); } ! gwc_printk(GWC_KSYS_IDX, "%s: Unloading %s modules...\n", DEVICE_NAME, DEVICE_NAME); exit_pf(); if ( free_blk_hash_table() < 0 ) { ! gwc_printk (GWC_KSYS_IDX, "%s: Failed to free all resources\n", DEVICE_NAME); } exit_kuio(); *************** *** 663,668 **** module_exit(gwc_pf_exit); - module_param(debug, int, 0444); - MODULE_PARM_DESC(debug, "enable pfilter debug output (default 0 off)"); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); --- 669,672 ---- Index: sysktimer.c =================================================================== RCS file: /cvsroot/netadm/gwc/pf/sysktimer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sysktimer.c 18 Mar 2006 17:45:41 -0000 1.4 --- sysktimer.c 6 May 2006 15:21:07 -0000 1.5 *************** *** 1,7 **** ! /* ! * filename : sysktimer.c ! * 2006. 02. 28. (thu) 08:38:14 KST ! * jeho park <lin...@us...> ! */ #include <linux/init.h> --- 1,10 ---- ! /* ! Title : sysktimer.c ! Author : Jeho-Park <de...@sk...> ! Created date : 2006. 05. 05. (Fri) 18:08:22 KST ! Description : dynamic kernel timer of gwc ! ! */ ! #ident "@(#) $Header$" #include <linux/init.h> *************** *** 13,21 **** #include <linux/interrupt.h> #include <linux/kthread.h> #include "sysktimer.h" ! #define DRIVER_AUTHOR "jeho park <lin...@gm...>" #define DRIVER_VERSION "gwc-timer-" SZSYSVERSION #define DRIVER_DESC "gwc of netadm project " DRIVER_VERSION static int netadm_timer_thread (void *data) { --- 16,28 ---- #include <linux/interrupt.h> #include <linux/kthread.h> + #include "sysklog.h" #include "sysktimer.h" ! #define DRIVER_AUTHOR "jeho park <de...@sk...>" #define DRIVER_VERSION "gwc-timer-" SZSYSVERSION #define DRIVER_DESC "gwc of netadm project " DRIVER_VERSION + static unsigned long debug = DBG_GENERAL; + module_param(debug, ulong, 0644); + MODULE_PARM_DESC(debug, "debug bitmap"); static int netadm_timer_thread (void *data) { *************** *** 28,37 **** if (!p) { ret = -1; ! printk("null timer struct.\n"); } if ( p->t_time < 0 || p->t.tv_sec < 0 || p->t.tv_nsec < 0) { ret = -1; ! printk("invalid argument.\n"); } --- 35,44 ---- if (!p) { ret = -1; ! gwc_printk(GWC_KSYS_IDX,"null timer struct.\n"); } if ( p->t_time < 0 || p->t.tv_sec < 0 || p->t.tv_nsec < 0) { ret = -1; ! gwc_printk(GWC_KSYS_IDX,"invalid argument.\n"); } *************** *** 39,43 **** return ret; ! printk("%s timer start, timeout time: %d\n", DRIVER_VERSION, p->t_time); expire = timespec_to_jiffies(&p->t) + (p->t.tv_sec || p->t.tv_nsec); --- 46,50 ---- return ret; ! gwc_printk(GWC_KSYS_IDX,"%s timer start, timeout time: %d\n", DRIVER_VERSION, p->t_time); expire = timespec_to_jiffies(&p->t) + (p->t.tv_sec || p->t.tv_nsec); *************** *** 45,49 **** if ( p->t_time > 0 && jiffies > ( p->t_time * HZ + i_time) ) { ! printk("%s: timer timeout(%d)...\n", DRIVER_VERSION, p->t_time); break; } --- 52,56 ---- if ( p->t_time > 0 && jiffies > ( p->t_time * HZ + i_time) ) { ! gwc_printk(GWC_KSYS_IDX,"%s: timer timeout(%d)...\n", DRIVER_VERSION, p->t_time); break; } *************** *** 58,62 **** * i definitly assumed it was stemed from mine */ ! printk("%s: timer exit by user request\n", DRIVER_VERSION); return 1; } --- 65,69 ---- * i definitly assumed it was stemed from mine */ ! gwc_printk(GWC_KSYS_IDX,"%s: timer exit by user request\n", DRIVER_VERSION); return 1; } *************** *** 76,80 **** in_interrupt()? GFP_ATOMIC : GFP_KERNEL); if (!sysktimer) { ! printk("%s: Failed to kmalloc\n", DRIVER_VERSION); return NULL; } --- 83,87 ---- in_interrupt()? GFP_ATOMIC : GFP_KERNEL); if (!sysktimer) { ! gwc_printk(GWC_KSYS_IDX,"%s: Failed to kmalloc\n", DRIVER_VERSION); return NULL; } *************** *** 90,94 **** sysktimer->t.tv_nsec = p_nsec; ! printk("%s: successfully initialized sysktimer data\n", DRIVER_VERSION); return sysktimer; } --- 97,101 ---- sysktimer->t.tv_nsec = p_nsec; ! gwc_printk(GWC_KSYS_IDX,"%s: successfully initialized sysktimer data\n", DRIVER_VERSION); return sysktimer; } *************** *** 100,104 **** tsk = kthread_create ( netadm_timer_thread, timer, "%s", DRIVER_VERSION); if (IS_ERR(tsk)) { ! printk("can't create netadm_timer\n"); return -EAGAIN; } --- 107,111 ---- tsk = kthread_create ( netadm_timer_thread, timer, "%s", DRIVER_VERSION); if (IS_ERR(tsk)) { ! gwc_printk(GWC_KSYS_IDX,"can't create netadm_timer\n"); return -EAGAIN; } *************** *** 117,124 **** ret = kthread_stop(tsk); if (ret < 0 ) { ! printk("%s: Failed to stop task(%d)\n", DRIVER_VERSION, pid); } else { ! printk("%s: Success to stop pid(%d)\n", DRIVER_VERSION, pid); } --- 124,131 ---- ret = kthread_stop(tsk); if (ret < 0 ) { ! gwc_printk(GWC_KSYS_IDX,"%s: Failed to stop task(%d)\n", DRIVER_VERSION, pid); } else { ! gwc_printk(GWC_KSYS_IDX,"%s: Success to stop pid(%d)\n", DRIVER_VERSION, pid); } *************** *** 127,131 **** } else { ! printk("%s: There is no suck task(%d), sysktimer(%s)\n", DRIVER_VERSION, pid, sysktimer? "not null must be free":"null"); } --- 134,138 ---- } else { ! gwc_printk(GWC_KSYS_IDX,"%s: There is no suck task(%d), sysktimer(%s)\n", DRIVER_VERSION, pid, sysktimer? "not null must be free":"null"); } *************** *** 137,141 **** static int __init init_netadm_timer(void) { ! printk("%s: register netadm timer\n", DRIVER_VERSION); return 0; } --- 144,148 ---- static int __init init_netadm_timer(void) { ! gwc_printk(GWC_KSYS_IDX,"%s: register netadm timer\n", DRIVER_VERSION); return 0; } *************** *** 144,148 **** static void __exit exit_netadm_timer(void) { ! printk("%s: unregister netadm timer\n", DRIVER_VERSION); } --- 151,155 ---- static void __exit exit_netadm_timer(void) { ! gwc_printk(GWC_KSYS_IDX,"%s: unregister netadm timer\n", DRIVER_VERSION); } Index: Makefile =================================================================== RCS file: /cvsroot/netadm/gwc/pf/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 30 Apr 2006 18:47:25 -0000 1.5 --- Makefile 6 May 2006 15:21:07 -0000 1.6 *************** *** 2,6 **** # # Title : Makefile ! # Author : Jeho-Park <lin...@gm...> # Created date : 2006. 01. 31. (thu) 01:40:38 KST # Description : Makefile for pf --- 2,6 ---- # # Title : Makefile ! # Author : Jeho-Park <de...@sk...> # Created date : 2006. 01. 31. (thu) 01:40:38 KST # Description : Makefile for pf *************** *** 10,13 **** --- 10,14 ---- obj-m += sysktimer.o obj-m += pf.o + obj-m += sysklog.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) |