netadm-devel Mailing List for netadm (Page 8)
Status: Beta
Brought to you by:
linuxpark
You can subscribe to this list here.
2006 |
Jan
(4) |
Feb
(78) |
Mar
(70) |
Apr
(32) |
May
(28) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: jeho-Park <par...@ho...> - 2006-02-18 05:09:16
|
Hi kwan-kyung =20 thanks for your interest about netadm. I registered your ID as a developer. I setup your permission to be able to access shell.sf.net, cvs and others except a permission of project admin.=20 I hope you not to be afraid to modify current source files of the gwc in the netadm project through cvs.sf.net, Because I saved last version of gwc.=20 =20 Todays, I have been making a document for new developer to our netadm and trying to use snort2.0 with reading it=A1=AFs manual before = analyzing the source code of that.=20 The link of that document is http://netadm.sourceforge.net/devel_netadm_ko.txt =20 =20 Sometime later, I will ask you to help me to translate this document from Korean into english. :-)=20 This document will describe how to use a built-in library of the gwc which was implemented and some other how to . So I hope you to read it first and then develop a IPS or viruswall.=20 =20 if you have good idea about IDS, IPS or others, please let me know through this mailing list.=20 Geoge also will share the information about IDS or snort. Geoge Hwang is undergraduate student in iowa university in USA. His majority is computer science. =20 If it is difficult to show your thinking with email, use presentation file(ppt) just like this netadm_goal.ppt in http://jhpark.guideline.co.kr/data/PROJECT/netadm/cherokee/design/=20 =20 if I finish up the work which make developer document, I will let you know.=20 thanks=20 =20 -----Original Message----- From: net...@li... [mailto:netadm-devel- ad...@li...] On Behalf Of MoonC Sent: Saturday, February 18, 2006 1:48 AM To: net...@li... Subject: [Netadm-devel] =C1=A6=B0=A1 =B0=A1=C1=F6=B0=ED =C0=D6=B4=C2 = sf.net ID=C0=D4=B4=CF=B4=D9. =20 netadm =C7=C1=B7=CE=C1=A7=C6=AE=BF=A1 =B0=FC=BD=C9=C0=CC =C0=D6=B0=ED, = =C7=C1=B7=CE=C1=A7=C6=AE=BF=A1 =C2=FC=BF=A9=C7=CF=B1=E2 = =C0=A7=C7=D8=BC=AD. netadm-devel=B8=DE=C0=CF=B8=B5 =B8=AE=BD=BA=C6=AE=BF=A1 = =B0=A1=C0=D4=C7=CF=BF=B4=BD=C0=B4=CF=B4=D9. =C1=A6=B0=A1 = =B0=A1=C1=F6=B0=ED =C0=D6=B4=C2=20 =BC=D2=BD=BA=C6=F7=C1=F6 =BE=C6=C0=CC=B5=F0=B4=C2 = bosaly=C0=D4=B4=CF=B4=D9. =B1=D7=B8=AE=B0=ED =C1=A6=B0=A1 =C1=D6=B7=CE = =BB=E7=BF=EB=C7=CF=B4=C2 =B8=DE=C0=CF=C1=D6=BC=D2=B4=C2 bo...@gm...=C0=D4=B4=CF=B4=D9. =BE=D5=C0=B8=B7=CE = =C7=C1=B7=CE=C1=A7=C6=AE=BF=A1 =C2=FC=BF=A9=C7=CF=B0=D4 = =B5=C8=B4=D9=B8=E9, =BA=B8=BE=C8=B0=FC=B7=C3 =C6=C4=C6=AE(IPS=B3=AA VirusWall=B5=EE)=BF=A1=BC=AD =B0=B3=B9=DF=C0=BB = =C7=D8=BA=B8=B0=ED =BD=CD=BD=C0=B4=CF=B4=D9.=20 =B1=D7=B7=B3 =BE=D5=C0=B8=B7=CE =C0=DF = =BA=CE=C5=B9=B5=E5=B8=AE=B0=DA=BD=C0=B4=CF=B4=D9. =20 p.s. =C1=A6=B0=A1 =BF=B5=BE=EE=B0=A1 =BC=AD=C5=F8=BE=EE=BC=AD = =C3=B3=C0=BD=BA=B8=B3=BB=B4=C2 =B8=DE=C0=CF=C0=BA =C7=D1=B1=DB=B7=CE = =BA=B8=B3=BB=C1=F6=B8=B8, =B4=D9=C0=BD=BA=CE=C5=CD=B4=C2 =B4=D9=B8=A5=BA=D0=B5=E9=B5=B5 =BA=B8=BD=C7=BC=F6 =C0=D6=B0=D4 = =BF=B5=BE=EE=B7=CE =BA=B8=B3=BE=BC=F6=C0=D6=B5=B5=B7=CF = =B3=EB=B7=C2=C7=CF=B0=DA=BD=C0=B4=CF=B4=D9.=20 |
From: MoonC <bo...@gm...> - 2006-02-17 16:47:43
|
bmV0YWRtICDHwbfOwafGrr+hILD8vcnAzCDA1rDtLCDHwbfOwafGrr+hIML8v6nHz7HiIMCnx9i8 rS4KbmV0YWRtLWRldmVsuN7Az7i1ILiuvbrGrr+hILChwNTHz7+0vcC0z7TZLiDBprChILChwfaw 7SDA1rTCCrzSvbrG98H2IL7GwMy18LTCIGJvc2FsecDUtM+02S4gsde4rrDtIMGmsKEgwda3ziC7 57/rx8+0wiC43sDPwda80rTCIGJvc2FseUBnbWFpbC5jb23A1LTPtNkuIL7VwLi3ziDHwbfOwafG rr+hCsL8v6nHz7DUILXItNm46Swguri+yLD8t8MgxsTGrihJUFOzqiBWaXJ1c1dhbGy17im/obyt ILCzud/AuyDH2Lq4sO0gvc29wLTPtNkuCrHXt7MgvtXAuLfOIMDfILrOxbm15biusNq9wLTPtNku CgpwLnMuIMGmsKEgv7W+7rChILytxfi+7rytIMOzwL26uLO7tMIguN7Az8C6IMfRsdu3ziC6uLO7 wfa4uCwgtNnAvbrOxc20wiC02bilutC16bW1ILq4vce89iDA1rDUIL+1vu63ziC6uLO+vPbA1rW1 t88gs+u3wsfPsNq9wLTPtNkuCg== |
From: linuxpark <lin...@us...> - 2006-02-17 08:09:43
|
Update of /cvsroot/netadm/gwc/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18956/include Modified Files: global.h Log Message: MOD: Add: print release version in GUI main. MOD: redefine SZSYSVERSION MOD: redefine VERSION in install.sh Index: global.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/global.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** global.h 30 Jan 2006 17:41:29 -0000 1.1.1.1 --- global.h 17 Feb 2006 08:09:18 -0000 1.2 *************** *** 29,33 **** #define SZPKGNAME "Netadm network control system" #define SZSYSCOPYRIGHT "GPL v2" ! #define SZSYSVERSION "v0.1" /* package naming , version , copyright - end */ /* exe, config file path - start */ --- 29,33 ---- #define SZPKGNAME "Netadm network control system" #define SZSYSCOPYRIGHT "GPL v2" ! #define SZSYSVERSION "gwc-v0.1-pre2" /* package naming , version , copyright - end */ /* exe, config file path - start */ |
From: linuxpark <lin...@us...> - 2006-02-17 08:09:43
|
Update of /cvsroot/netadm/gwc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18956 Modified Files: CHANGES Log Message: MOD: Add: print release version in GUI main. MOD: redefine SZSYSVERSION MOD: redefine VERSION in install.sh Index: CHANGES =================================================================== RCS file: /cvsroot/netadm/gwc/CHANGES,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CHANGES 17 Feb 2006 06:58:59 -0000 1.4 --- CHANGES 17 Feb 2006 08:09:18 -0000 1.5 *************** *** 1,5 **** - Changes in gwc-v0.1-pre2 -------------------------- FIX: error during deleting object --- 1,10 ---- Changes in gwc-v0.1-pre2 + ------------------------ + FIX: fix the problem which was stemed from GUI statusbar. + DEL: ugle GUI string. + MOD: replace from linkedlist to hashtable in pf for better performance. + + Changes in gwc-v0.1-pre1 -------------------------- FIX: error during deleting object |
From: linuxpark <lin...@us...> - 2006-02-17 08:09:43
|
Update of /cvsroot/netadm/gwc/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18956/scripts Modified Files: install.sh Log Message: MOD: Add: print release version in GUI main. MOD: redefine SZSYSVERSION MOD: redefine VERSION in install.sh Index: install.sh =================================================================== RCS file: /cvsroot/netadm/gwc/scripts/install.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** install.sh 6 Feb 2006 19:28:24 -0000 1.6 --- install.sh 17 Feb 2006 08:09:18 -0000 1.7 *************** *** 21,25 **** CONFILE=config PROD="Netadm-gwc" ! VERSION="pre-gwc-v0.1" INST=/usr/bin/install LOGFILE=install.log --- 21,25 ---- CONFILE=config PROD="Netadm-gwc" ! VERSION="gwc-v0.1-pre2" INST=/usr/bin/install LOGFILE=install.log |
From: linuxpark <lin...@us...> - 2006-02-17 08:09:43
|
Update of /cvsroot/netadm/gwc/gwcguid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18956/gwcguid Modified Files: interface.c Log Message: MOD: Add: print release version in GUI main. MOD: redefine SZSYSVERSION MOD: redefine VERSION in install.sh Index: interface.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/interface.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** interface.c 17 Feb 2006 02:48:36 -0000 1.7 --- interface.c 17 Feb 2006 08:09:18 -0000 1.8 *************** *** 39,42 **** --- 39,43 ---- #include "sysutil.h" #endif + #include "global.h" #include "sysshm.h" *************** *** 97,104 **** GtkWidget *label22; GtkWidget *label1; window1 = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(window1, 490, 600); ! gtk_window_set_title(GTK_WINDOW(window1), _("Netadm gwc - GateWay Controler -")); alignment6 = gtk_alignment_new(0.5, 0.5, 1, 1); --- 98,107 ---- GtkWidget *label22; GtkWidget *label1; + gchar version[MINBUF]; + sprintf (version, "Netadm gwc - %s", SZSYSVERSION); window1 = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(window1, 490, 600); ! gtk_window_set_title(GTK_WINDOW(window1), _(version)); alignment6 = gtk_alignment_new(0.5, 0.5, 1, 1); |
From: linuxpark <lin...@us...> - 2006-02-17 07:31:39
|
Update of /cvsroot/netadm/gwc/pf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1211 Modified Files: pf.c Log Message: DEL: delete debug message. dprintk(""); Index: pf.c =================================================================== RCS file: /cvsroot/netadm/gwc/pf/pf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pf.c 17 Feb 2006 06:59:00 -0000 1.2 --- pf.c 17 Feb 2006 07:31:35 -0000 1.3 *************** *** 145,154 **** blkhp = &blk_hash_table[i].chain; while( (blkh = *blkhp) != NULL){ - dprintk(""); blkh->host.pktcnt = 0; blkhp = &blkh->next; - dprintk(""); - printk ("%s: update packet count of (%u.%u.%u.%u)\n", - DEVICE_NAME, NIPQUAD(blkh->host.saddr)); } spin_unlock(&blk_hash_table[i].lock); --- 145,150 ---- *************** *** 181,195 **** unsigned hash; - dprintk(""); hash = blk_hash_code(saddr); - dprintk(""); spin_lock(&blk_hash_table[hash].lock); pre_blkh = blk_hash_table[hash].chain; blkh = pre_blkh->next; - dprintk(""); while ( (saddr != blkh->key.saddr) && blkh != NULL) { - dprintk(""); pre_blkh = pre_blkh->next; blkh = pre_blkh->next; --- 177,187 ---- *************** *** 197,201 **** if (blkh == NULL) { - dprintk(""); spin_unlock(&blk_hash_table[hash].lock); printk ("%s: There is no such host %u.%u.%u.%u\n", DEVICE_NAME, NIPQUAD(saddr)); --- 189,192 ---- *************** *** 203,207 **** } - dprintk(""); pre_blkh->next = blkh->next; kmem_cache_free( kmem_cachep, blkh); --- 194,197 ---- *************** *** 311,315 **** ++hp->pktcnt; ! dprintk("Drop | SFlow Control %u.%u.%u.%u [%d/%d] \n", NIPQUAD(hp->saddr), hp->pktcnt, hp->max_pktrate); spin_unlock (&blk_hash_table[hash].lock); --- 301,305 ---- ++hp->pktcnt; ! printk("Drop | SFlow Control %u.%u.%u.%u [%d/%d] \n", NIPQUAD(hp->saddr), hp->pktcnt, hp->max_pktrate); spin_unlock (&blk_hash_table[hash].lock); *************** *** 323,327 **** tcph =(void *) (sb)->data +sb->nh.iph->ihl * 4; tcph->seq += 3; ! dprintk("[Modify TCP seq] %u.%u.%u.%u old seq : 0x%x, new seq 0x%x\n", NIPQUAD(hp->saddr),tcph->seq - 3, tcph->seq); } --- 313,317 ---- tcph =(void *) (sb)->data +sb->nh.iph->ihl * 4; tcph->seq += 3; ! printk("[Modify TCP seq] %u.%u.%u.%u old seq : 0x%x, new seq 0x%x\n", NIPQUAD(hp->saddr),tcph->seq - 3, tcph->seq); } |
From: linuxpark <lin...@us...> - 2006-02-17 06:59:16
|
Update of /cvsroot/netadm/gwc/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16776/include Modified Files: sysioctl.h sysshm.h Log Message: MOD: 1. Replace current linkedlist in pf to hashtable for better performance. as there are more rules of pf, the performance will be better than linkedlist. it was inspired by route cache in linux of alan cox's debug flag will print the result of pf. 2. Add IOCTLPF_REFLESH from now, only the rules in GUI or cli of pf will be applied only if user click "apply" or hostpol_apply in cli command. TODO: support subnet in "flow control" Index: sysshm.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/sysshm.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sysshm.h 9 Feb 2006 17:54:06 -0000 1.3 --- sysshm.h 17 Feb 2006 06:58:59 -0000 1.4 *************** *** 13,17 **** #define __SYS_SHM_INCLUDED ! #define APCSHMID 0x64376329 /* state definition flag */ #define AP_NET_VALID 0x00000001 --- 13,17 ---- #define __SYS_SHM_INCLUDED ! #define APCSHMID 0x94376329 /* state definition flag */ #define AP_NET_VALID 0x00000001 Index: sysioctl.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/sysioctl.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sysioctl.h 30 Jan 2006 17:41:29 -0000 1.1.1.1 --- sysioctl.h 17 Feb 2006 06:58:59 -0000 1.2 *************** *** 9,26 **** #ident "@(#) $Header$" ! #ifndef _IOCTLWIBRO_H_ ! #define _IOCTLWIBRO_H_ ! #define IOCTLWIBRO_MAGIC 't' typedef struct { __u32 ip; __u32 max_pktrate; ! } __attribute__ ((packed)) wibro_kuio_msg_t; ! #define IOCTLWIBRO_REGISTER_SRCBLOCK _IO (IOCTLWIBRO_MAGIC, 0) ! #define IOCTLWIBRO_REGISTER_MODSEQ _IO (IOCTLWIBRO_MAGIC, 1) ! #define IOCTLWIBRO_UNREGISTER_HOST _IO (IOCTLWIBRO_MAGIC, 2) ! #define IOCTLWIBRO_MAXNR 3 ! #endif /* _IOCTLWIBRO_H_ */ --- 9,27 ---- #ident "@(#) $Header$" ! #ifndef _IOCTLPF_H_ ! #define _IOCTLPF_H_ ! #define IOCTLPF_MAGIC 't' typedef struct { __u32 ip; __u32 max_pktrate; ! } __attribute__ ((packed)) kuio_msg_t; ! #define IOCTLPF_REGISTER_SRCBLOCK _IO (IOCTLPF_MAGIC, 0) ! #define IOCTLPF_REGISTER_MODSEQ _IO (IOCTLPF_MAGIC, 1) ! #define IOCTLPF_UNREGISTER_HOST _IO (IOCTLPF_MAGIC, 2) ! #define IOCTLPF_REFLESH _IO (IOCTLPF_MAGIC, 3) ! #define IOCTLPF_MAXNR 4 ! #endif /* _IOCTLPF_H_ */ |
From: linuxpark <lin...@us...> - 2006-02-17 06:59:16
|
Update of /cvsroot/netadm/gwc/pf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16776/pf Modified Files: pf.c pf.h sysioctl.h Log Message: MOD: 1. Replace current linkedlist in pf to hashtable for better performance. as there are more rules of pf, the performance will be better than linkedlist. it was inspired by route cache in linux of alan cox's debug flag will print the result of pf. 2. Add IOCTLPF_REFLESH from now, only the rules in GUI or cli of pf will be applied only if user click "apply" or hostpol_apply in cli command. TODO: support subnet in "flow control" Index: pf.h =================================================================== RCS file: /cvsroot/netadm/gwc/pf/pf.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pf.h 30 Jan 2006 17:41:25 -0000 1.1.1.1 --- pf.h 17 Feb 2006 06:59:00 -0000 1.2 *************** *** 13,40 **** #include <linux/udp.h> #include <linux/types.h> #if !defined(PFINFO) ! #define PFINFO "WIBRO_PF" #endif - #ifndef DEVICE_NAME ! #define DEVICE_NAME "pf" #endif - #ifndef KUIO_DEVICE_NAME ! #define KUIO_DEVICE_NAME "pf" #endif ! #define KUIO_MAJOR_NUM 253 ! #define dprintk( fmt, args... ) do { \ ! if ( debug ) \ ! printk("%s: (%s,%s:%d): " fmt, \ ! DEVICE_NAME, __FILE__, __FUNCTION__, __LINE__, ##args); \ ! \ ! printk("%s: " fmt, \ ! DEVICE_NAME, __FILE__, __FUNCTION__, __LINE__, ##args); \ ! } while(0) ! #define LINEDEBUG printk("\n%d\n",__LINE__); static __inline__ int --- 13,63 ---- #include <linux/udp.h> #include <linux/types.h> + #if !defined(PFINFO) ! #define PFINFO "cherokee-pf" #endif #ifndef DEVICE_NAME ! #define DEVICE_NAME "cherokee-pf" #endif #ifndef KUIO_DEVICE_NAME ! #define KUIO_DEVICE_NAME "cherokee-kuio" #endif + #define KUIO_MAJOR_NUM 253 + #define BLOCK_HOST 0x0001 + #define MODIFY_SEQ 0x0002 ! struct host { ! __u32 saddr; ! __u8 type; ! __u32 pktcnt; ! __u32 max_pktrate; ! }; ! struct blk_key{ ! __u32 saddr; ! }; ! struct blk{ ! struct blk *next; ! struct host host; ! struct blk_key key; ! }; ! ! struct blk_hash_bucket{ ! struct blk *chain; ! spinlock_t lock; ! }__attribute__((aligned (8))); ! ! unsigned blk_hash_mask; ! ! static __inline__ unsigned blk_hash_code (u32 saddr) { ! u32 daddr = 0x1289CD94; ! u8 tos = 0x07; ! ! unsigned hash = ((daddr & 0xF0F0F0F0) >> 4) | ((daddr & 0x0F0F0F0F) << 4); ! hash ^= saddr ^ tos; ! hash ^= (hash >> 16); ! return (hash ^ (hash >> 8)) & blk_hash_mask; ! } static __inline__ int *************** *** 91,93 **** --- 114,122 ---- } + #define dprintk( fmt, args... ) do { \ + if ( debug ) \ + printk("%s: [%s:%d] " fmt, \ + DEVICE_NAME, __FUNCTION__, __LINE__, ##args); \ + } while(0) + #endif /* __ASRV_PFILTER_H */ Index: pf.c =================================================================== RCS file: /cvsroot/netadm/gwc/pf/pf.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pf.c 30 Jan 2006 17:41:25 -0000 1.1.1.1 --- pf.c 17 Feb 2006 06:59:00 -0000 1.2 *************** *** 44,160 **** #include "sysioctl.h" ! static int debug_pf __initdata = 0; ! /* X86 list accelator */ ! #ifndef container_of ! #define container_of(ptr, type, member) ({ \ ! const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ! (type *)( (char *)__mptr - offsetof(type,member) );}) #endif ! /* ! * 2.6.x does not include this macro so i port here ! */ ! #define BLOCK_HOST 0x0001 ! #define MODIFY_SEQ 0x0002 ! struct host { ! struct list_head list; ! __u32 ip; ! __u8 type; ! __u32 pktcnt; ! __u32 max_pktrate; ! }; ! static struct rw_semaphore srclist_mutex; ! static rwlock_t srclist_lock; ! static struct list_head srclist = LIST_HEAD_INIT(srclist); ! #define PLIST(a, b, c, s) do { \ ! printk("%s\n", s); \ ! list_for_each_entry (a, &b, c) { \ ! printk("Registered Src: %u.%u.%u.%u\n", NIPQUAD(a->ip)); \ ! } \ ! }while(0) ! static int kuio_rdopen = 0; ! static int kuio_wdopen = 0; ! static struct nf_hook_ops wibro_iphook; ! static struct timer_list pc_alz; ! static void set_timer(void); ! static void ! update_pktcnt(unsigned long ptr) ! { ! struct host *hp; ! read_lock(&srclist_lock); ! list_for_each_entry(hp, &srclist, list) { ! hp->pktcnt = 0; ! } ! read_unlock(&srclist_lock); ! set_timer(); } ! static void ! set_timer(void) ! { ! pc_alz.function = update_pktcnt; ! pc_alz.data = 0; ! pc_alz.expires = jiffies + HZ; ! add_timer(&pc_alz); } ! static unsigned int ! wibro_ip_hook_func(unsigned int hooknum, ! struct sk_buff **skb, ! const struct net_device *in, ! const struct net_device *out, int (*okfn) (struct sk_buff *)) { ! struct sk_buff *sb = *skb; ! const struct iphdr *ip = sb->nh.iph; ! struct tcphdr *tcph; ! struct host *hp; ! /* down_read(&srclist_mutex); */ ! read_lock(&srclist_lock); ! list_for_each_entry(hp, &srclist, list) { ! if (sb->nh.iph->saddr == hp->ip) { ! if (hp->type == BLOCK_HOST) { /* block host */ ! /* up_read(&srclist_mutex); */ ! if (!hp->max_pktrate ! || hp->pktcnt > hp->max_pktrate) { ! printk ! ("%s: [Drop | SFlow Control] %u.%u.%u.%u [%d/%d] \n", ! DEVICE_NAME, NIPQUAD(hp->ip), ! hp->pktcnt, hp->max_pktrate); ! ++hp->pktcnt; ! read_unlock(&srclist_lock); ! return NF_DROP; ! } ! ++hp->pktcnt; ! } else { /* modify seq */ ! if (ip->protocol == IPPROTO_TCP) { ! tcph = ! (void *) (sb)->data + ! sb->nh.iph->ihl * 4; ! tcph->seq += 3; ! printk ! ("%s: [Modify TCP seq] %u.%u.%u.%u old seq : 0x%x, new seq 0x%x\n", ! DEVICE_NAME, NIPQUAD(hp->ip), ! tcph->seq - 3, tcph->seq); ! } ! } ! } } - /* up_read(&srclist_mutex); */ - read_unlock(&srclist_lock); ! return NF_ACCEPT; } --- 44,334 ---- #include "sysioctl.h" ! static int debug __initdata = 0; ! static int kuio_rdopen = 0; ! static int kuio_wdopen = 0; ! static struct nf_hook_ops iphook_tab; ! static struct timer_list pc_alz; ! static void set_timer(void); ! ! /* block list hash table */ ! static struct blk_hash_bucket *blk_hash_table; ! static kmem_cache_t *kmem_cachep; ! ! static int blk_intern_hash(unsigned hash, struct blk *blk) ! { ! struct blk *blkh, **blkhp; ! int chain_length = 0; ! ! blkhp = &blk_hash_table[hash].chain; ! ! spin_lock (&blk_hash_table[hash].lock); ! while( (blkh = *blkhp) != NULL){ ! ! if( blkh->key.saddr == blk->key.saddr ){ ! *blkhp = blkh->next; ! blkh->next = blk_hash_table[hash].chain; ! blk_hash_table[hash].chain = blkh; ! /* need jiffies ?*/ ! spin_unlock(&blk_hash_table[hash].lock); ! *blkhp = blkh; ! printk("%s:%s: We meet any collision\n", DEVICE_NAME, __FUNCTION__); ! return -1; ! } ! ! chain_length++; ! printk("%s: chain length(%d)\n", DEVICE_NAME, chain_length); ! blkhp = &blkh->next; ! } ! ! blk_hash_table[hash].chain=blk; ! spin_unlock(&blk_hash_table[hash].lock); ! return 1; ! } ! ! static struct blk *blk_alloc( void ){ ! struct blk *blknode; ! ! 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; ! } ! ! memset (blknode, 0, sizeof (struct blk)); ! return blknode; ! #if 0 ! new->host = (struct host *) kmalloc(sizeof (struct host), ! in_interrupt()? GFP_ATOMIC : GFP_KERNEL); ! if (!new->host) { ! printk("%s: Failed to alloc host\n", DEVICE_NAME); ! return NULL; ! } ! #endif ! } ! ! static int free_blk_hash_table(void){ ! struct blk *blkh, **blkhp; ! int i; ! ! for( i = 0; i <= blk_hash_mask; i++){ ! blkhp = &blk_hash_table[i].chain; ! ! spin_lock(&blk_hash_table[i].lock); ! while( (blkh = *blkhp) != NULL){ ! blkhp = &blkh->next; ! #if 0 ! kfree (blkh->host); /* FIXME */ #endif + printk("kmem_cache_free\n"); + kmem_cache_free(kmem_cachep, blkh); + } + spin_unlock(&blk_hash_table[i].lock); + } ! 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; ! } ! static void update_pktcnt( unsigned long ptr ){ ! struct blk *blkh, **blkhp; ! int i; ! for( i = 0; i <= blk_hash_mask; i++){ ! ! spin_lock(&blk_hash_table[i].lock); ! blkhp = &blk_hash_table[i].chain; ! while( (blkh = *blkhp) != NULL){ ! dprintk(""); ! blkh->host.pktcnt = 0; ! blkhp = &blkh->next; ! dprintk(""); ! printk ("%s: update packet count of (%u.%u.%u.%u)\n", ! DEVICE_NAME, NIPQUAD(blkh->host.saddr)); ! } ! spin_unlock(&blk_hash_table[i].lock); ! } ! set_timer(); ! } ! static int register_host( u32 saddr, u8 type, u32 max_pktrate){ ! struct blk *key_hp; ! int ret; ! unsigned hash; ! key_hp = blk_alloc(); ! if(!key_hp) { ! printk("%s : %s Failed to blk_alloc\n",DEVICE_NAME, __FUNCTION__ ); ! return -1; ! } ! key_hp->key.saddr = key_hp->host.saddr = saddr; ! key_hp->host.type = type; ! key_hp->host.pktcnt = 0; ! key_hp->host.max_pktrate = max_pktrate; ! hash = blk_hash_code(key_hp->key.saddr); ! return ret = blk_intern_hash (hash, key_hp); } ! static int unregister_host (u32 saddr) { ! struct blk *blkh, *pre_blkh; ! unsigned hash; ! dprintk(""); ! hash = blk_hash_code(saddr); ! ! dprintk(""); ! spin_lock(&blk_hash_table[hash].lock); ! pre_blkh = blk_hash_table[hash].chain; ! blkh = pre_blkh->next; ! ! dprintk(""); ! while ( (saddr != blkh->key.saddr) && blkh != NULL) { ! dprintk(""); ! pre_blkh = pre_blkh->next; ! blkh = pre_blkh->next; ! } ! ! if (blkh == NULL) { ! dprintk(""); ! spin_unlock(&blk_hash_table[hash].lock); ! printk ("%s: There is no such host %u.%u.%u.%u\n", DEVICE_NAME, NIPQUAD(saddr)); ! return -1; ! } ! ! dprintk(""); ! pre_blkh->next = blkh->next; ! kmem_cache_free( kmem_cachep, blkh); ! spin_unlock(&blk_hash_table[hash].lock); ! printk ("%s: Successfully unregistered host %u.%u.%u.%u\n", DEVICE_NAME, NIPQUAD(saddr)); ! return 1; } ! static int find_host (u32 saddr) { ! struct blk *blkh; ! unsigned hash; ! ! hash = blk_hash_code(saddr); ! ! spin_lock(&blk_hash_table[hash].lock); ! for( blkh = blk_hash_table[hash].chain; blkh; blkh = blkh->next){ ! ! if ( blkh->key.saddr == saddr ) { ! spin_unlock(&blk_hash_table[hash].lock); ! return 1; ! } ! } ! spin_unlock(&blk_hash_table[hash].lock); ! return -1; ! } ! ! static int init_blk_hash_table( void ){ ! int goal, order, i; ! ! kmem_cachep = kmem_cache_create("cherokee-pf", sizeof(struct blk), 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; ! } ! ! goal = num_physpages >> (26 - PAGE_SHIFT); ! for(order=0; (1UL<<order)<goal; order++); ! ! do{ ! blk_hash_mask=(1UL<<order)*PAGE_SIZE / sizeof(struct blk_hash_bucket); ! ! while(blk_hash_mask & (blk_hash_mask-1)) ! blk_hash_mask--; ! ! blk_hash_table = (struct blk_hash_bucket*)__get_free_pages(GFP_ATOMIC, order); ! ! }while( blk_hash_table==NULL && --order > 0 ); ! ! printk("%s: num_physpages (%ld) PAGE_SHIFT (%d) goad(%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); ! } ! ! blk_hash_mask--; ! for( i = 0; i <= blk_hash_mask; i++ ){ ! spin_lock_init (&blk_hash_table[i].lock); ! blk_hash_table[i].chain=NULL; ! } ! ! printk("%s: Success to initialize blk hash table \n",DEVICE_NAME); ! return 1; ! } ! ! static void set_timer(void) { ! pc_alz.function = update_pktcnt; ! pc_alz.data = 0; ! pc_alz.expires = jiffies + HZ; ! add_timer(&pc_alz); ! } ! static unsigned int ! ip_hook_func (unsigned int hooknum, ! struct sk_buff **skb, ! const struct net_device *in, ! const struct net_device *out, int (*okfn) (struct sk_buff *)) ! { ! struct sk_buff *sb = *skb; ! const struct iphdr *ip = sb->nh.iph; ! struct tcphdr *tcph; ! struct blk *blkh; ! struct host *hp; ! unsigned hash; ! hash = blk_hash_code(ip->saddr); ! spin_lock (&blk_hash_table[hash].lock); ! for( blkh = blk_hash_table[hash].chain; blkh; blkh = blkh->next){ ! if ( blkh->key.saddr == ip->saddr ) { ! hp = &blkh->host; ! ! if (hp->type == BLOCK_HOST) { ! ! /* Block host or Flow control */ ! if (!hp->max_pktrate || hp->pktcnt > hp->max_pktrate) { ! ++hp->pktcnt; ! dprintk("Drop | SFlow Control %u.%u.%u.%u [%d/%d] \n", ! NIPQUAD(hp->saddr), hp->pktcnt, hp->max_pktrate); ! spin_unlock (&blk_hash_table[hash].lock); ! return NF_DROP; } ! ++hp->pktcnt; ! } else { ! /* modify TCP seq */ ! if (ip->protocol == IPPROTO_TCP) { ! tcph =(void *) (sb)->data +sb->nh.iph->ihl * 4; ! tcph->seq += 3; ! dprintk("[Modify TCP seq] %u.%u.%u.%u old seq : 0x%x, new seq 0x%x\n", ! NIPQUAD(hp->saddr),tcph->seq - 3, tcph->seq); ! } ! } ! } ! } ! spin_unlock (&blk_hash_table[hash].lock); ! return NF_ACCEPT; } *************** *** 207,373 **** unsigned int cmd, unsigned long arg) { ! wibro_kuio_msg_t kuio_msg, *pmsg = &kuio_msg; #if 0 ! int err; #endif ! int size; ! unsigned long flags; ! int found = 0; ! struct host *hp; ! struct host *new; ! int ret; ! __u32 src; ! __u32 max_pktrate; ! if (_IOC_TYPE(cmd) != IOCTLWIBRO_MAGIC) ! return -EINVAL; ! if (_IOC_NR(cmd) >= IOCTLWIBRO_MAXNR) ! return -EINVAL; ! size = sizeof (wibro_kuio_msg_t); ! #if 0/* get rid of verify_area */ ! if (size) { ! err = 0; ! if (_IOC_DIR(cmd) & _IOC_WRITE) ! err = verify_area(VERIFY_READ, (void *) arg, size); ! if (err) ! return err; ! } ! #endif ! switch (cmd) { ! case IOCTLWIBRO_REGISTER_SRCBLOCK: ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! max_pktrate = (pmsg->max_pktrate); ! /* register host and block flag */ ! down_write(&srclist_mutex); ! list_for_each_entry(hp, &srclist, list) { ! if (hp->ip == src) { ! if (hp->type == BLOCK_HOST) { ! printk ! ("%s: [BLOCK] %u.%u.%u.%u is already registered\n", ! DEVICE_NAME, NIPQUAD(hp->ip)); ! up_write(&srclist_mutex); ! return -EBADSLT; ! } else { ! write_lock_irqsave(&srclist_lock, ! flags); ! hp->type = BLOCK_HOST; ! write_unlock_irqrestore(&srclist_lock, ! flags); ! printk ! ("%s: [SEQ->BLOCK] %u.%u.%u.%u was successfully updated\n", ! DEVICE_NAME, NIPQUAD(hp->ip)); ! found = 1; ! break; ! } ! } ! } ! if (!found) { ! new = (struct host *) kmalloc(sizeof (struct host), ! in_interrupt()? GFP_ATOMIC ! : GFP_KERNEL); ! if (!new) { ! printk("%s: Fail to malloc\n", DEVICE_NAME); ! up_write(&srclist_mutex); ! return -EFAULT; ! } ! new->ip = src; ! new->type = BLOCK_HOST; ! new->pktcnt = 0; ! new->max_pktrate = max_pktrate; ! write_lock_irqsave(&srclist_lock, flags); ! list_add(&new->list, &srclist); ! write_unlock_irqrestore(&srclist_lock, flags); ! printk("%s: %u.%u.%u.%u successfully inserted\n", ! DEVICE_NAME, NIPQUAD(src)); ! } ! up_write(&srclist_mutex); ! break; ! case IOCTLWIBRO_REGISTER_MODSEQ: ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! /* register host and seq flag */ ! down_write(&srclist_mutex); ! list_for_each_entry(hp, &srclist, list) { ! if (hp->ip == src) { ! if (hp->type == MODIFY_SEQ) { ! printk ! ("%s: [SEQK] %u.%u.%u.%u is already registered\n", ! DEVICE_NAME, NIPQUAD(src)); ! up_write(&srclist_mutex); ! return -EBADSLT; ! } else { ! write_lock_irqsave(&srclist_lock, ! flags); ! hp->type = MODIFY_SEQ; ! write_unlock_irqrestore(&srclist_lock, ! flags); ! printk ! ("%s: [SEQ->BLOCK] %u.%u.%u.%u was successfully updated\n", ! DEVICE_NAME, NIPQUAD(src)); ! found = 1; ! break; ! } ! } ! } ! if (!found) { ! new = (struct host *) kmalloc(sizeof (struct host), ! in_interrupt()? GFP_ATOMIC ! : GFP_KERNEL); ! if (!new) { ! printk("%s: Fail to malloc\n", DEVICE_NAME); ! up_write(&srclist_mutex); ! return -EFAULT; ! } ! new->ip = src; ! new->type = MODIFY_SEQ; ! write_lock_irqsave(&srclist_lock, flags); ! list_add(&new->list, &srclist); ! write_unlock_irqrestore(&srclist_lock, flags); ! printk("%s: %u.%u.%u.%u successfully inserted\n", ! DEVICE_NAME, NIPQUAD(src)); ! } ! up_write(&srclist_mutex); ! break; ! case IOCTLWIBRO_UNREGISTER_HOST: ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! /* unregister host */ ! down_write(&srclist_mutex); ! list_for_each_entry(hp, &srclist, list) { ! if (hp->ip == src) { ! found = 1; ! break; ! } ! } ! if (found) { ! /* remove host */ ! write_lock_irqsave(&srclist_lock, flags); ! list_del(&hp->list); ! write_unlock_irqrestore(&srclist_lock, flags); ! printk("%s: successfully removed (%u.%u.%u.%u)\n", ! DEVICE_NAME, NIPQUAD(src)); ! kfree(hp); ! } else { ! /* no such host */ ! printk("%s: There is no such host(%u.%u.%u.%u)\n", ! DEVICE_NAME, NIPQUAD(src)); ! up_write(&srclist_mutex); ! return -EBADSLT; ! } ! up_write(&srclist_mutex); ! break; } ! return 0; } --- 381,475 ---- unsigned int cmd, unsigned long arg) { ! kuio_msg_t kuio_msg, *pmsg = &kuio_msg; #if 0 ! int err; #endif ! int size; ! int ret; ! __u32 src; ! __u32 max_pktrate; ! if (_IOC_TYPE(cmd) != IOCTLPF_MAGIC) ! return -EINVAL; ! if (_IOC_NR(cmd) >= IOCTLPF_MAXNR) ! return -EINVAL; ! size = sizeof (kuio_msg_t); ! #if 0/* get rid of verify_area it may be obsolete from 2.6.x */ ! ! if (size) { ! err = 0; ! ! if (_IOC_DIR(cmd) & _IOC_WRITE) ! err = verify_area(VERIFY_READ, (void *) arg, size); ! ! if (err) ! return err; ! } ! #endif ! switch (cmd) { ! case IOCTLPF_REGISTER_SRCBLOCK: ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! max_pktrate = (pmsg->max_pktrate); ! /* register host and seq flag */ ! if ( find_host (src) > 0 ) { ! printk ("%s: %u.%u.%u.%u was already registered\n", DEVICE_NAME, NIPQUAD(src)); ! return -EBADSLT; ! ! } else { ! if ( register_host (src, BLOCK_HOST, max_pktrate) < 0 ) { ! return -EFAULT; ! } ! else ! printk ("%s: Success to register %u.%u.%u.%u\n", DEVICE_NAME, NIPQUAD(src)); ! } ! ! break; ! case IOCTLPF_REGISTER_MODSEQ: ! ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! /* register host and seq flag */ ! if ( find_host (src) > 0 ) { ! printk ("%s: %u.%u.%u.%u was already registered\n", DEVICE_NAME, NIPQUAD(src)); ! return -EBADSLT; ! ! } else { ! ! if ( register_host (src, MODIFY_SEQ, 0) < 0 ) { ! return -EFAULT; } + else + printk ("%s: Success to register %u.%u.%u.%u\n", DEVICE_NAME, NIPQUAD(src)); + } ! break; ! ! case IOCTLPF_UNREGISTER_HOST: ! ! ret = copy_from_user((void *) pmsg, (const void *) arg, size); ! src = (pmsg->ip); ! ! ret = unregister_host (src); ! if ( ret < 0 ) ! return -EFAULT; ! ! break; ! ! case IOCTLPF_REFLESH: ! free_blk_hash_table(); ! init_blk_hash_table(); ! break; ! } ! return 0; } *************** *** 375,379 **** device_read(struct file *filp, char *buf, size_t count, loff_t * f_pos) { ! return -EFAULT; } --- 477,481 ---- device_read(struct file *filp, char *buf, size_t count, loff_t * f_pos) { ! return -EFAULT; } *************** *** 381,385 **** device_write(struct file *filp, const char *buf, size_t count, loff_t * f_pos) { ! return -EFAULT; } --- 483,487 ---- device_write(struct file *filp, const char *buf, size_t count, loff_t * f_pos) { ! return -EFAULT; } *************** *** 396,412 **** init_kuio(void) { - 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; } --- 498,513 ---- init_kuio(void) { ! 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; } *************** *** 414,423 **** exit_kuio(void) { ! int ret; ! ! printk("%s: Unloading kernel vs user I/O module\n", KUIO_DEVICE_NAME); ! if ((ret = unregister_chrdev(KUIO_MAJOR_NUM, KUIO_DEVICE_NAME)) < 0) ! printk("%s: Device unregistration failed (%d)\n", ! KUIO_DEVICE_NAME, ret); } --- 515,523 ---- exit_kuio(void) { ! int ret; ! ! printk("%s: Unloading kernel vs user I/O module\n", DEVICE_NAME); ! if ((ret = unregister_chrdev(KUIO_MAJOR_NUM, DEVICE_NAME)) < 0) ! printk("%s: Device unregistration failed (%d)\n", DEVICE_NAME, ret); } *************** *** 425,437 **** init_pf(void) { ! printk("%s: Start pf modules ...\n", DEVICE_NAME); ! wibro_iphook.hook = wibro_ip_hook_func; ! wibro_iphook.hooknum = NF_IP_PRE_ROUTING; ! wibro_iphook.pf = PF_INET; ! wibro_iphook.priority = NF_IP_PRI_FIRST; ! nf_register_hook(&wibro_iphook); ! ! return 0; } --- 525,536 ---- init_pf(void) { + printk("%s: Register nfhook ...\n", DEVICE_NAME); + iphook_tab.hook = ip_hook_func; + iphook_tab.hooknum = NF_IP_PRE_ROUTING; + iphook_tab.pf = PF_INET; + iphook_tab.priority = NF_IP_PRI_FIRST; + nf_register_hook(&iphook_tab); ! return 0; } *************** *** 439,493 **** exit_pf(void) { ! ! printk("%s: Unloading pf modules...\n", DEVICE_NAME); ! nf_unregister_hook(&wibro_iphook); ! ! return 0; } static int __init ! wibro_nf_iphook_init(void) { ! printk("%s: Loading %s module ...\n", DEVICE_NAME, DEVICE_NAME); ! init_pf(); ! init_kuio(); ! rwlock_init(&srclist_lock); ! init_rwsem(&srclist_mutex); ! init_timer(&pc_alz); ! set_timer(); ! return 0; ! } ! static void ! free_src_list(void) ! { ! struct host *dp; ! while (!list_empty(&srclist)) { ! struct list_head *tmp; ! list_for_each(tmp, &srclist) { ! dp = list_entry(tmp, struct host, list); ! list_del(&dp->list); ! kfree(dp); ! break; ! } ! } } static void __exit ! wibro_nf_iphook_exit(void) { ! ! printk("%s: Unloading %s modules...\n", DEVICE_NAME, DEVICE_NAME); ! exit_pf(); ! exit_kuio(); ! del_timer(&pc_alz); ! free_src_list(); } ! module_init(wibro_nf_iphook_init); ! module_exit(wibro_nf_iphook_exit); ! module_param(debug_pf, int, 0444); ! MODULE_PARM_DESC(debug_pf, "enable pfilter debug output (default 0 off)"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("jeho park <par...@ho...>"); --- 538,579 ---- exit_pf(void) { ! printk("%s: Unregister nfhook modules...\n", DEVICE_NAME); ! nf_unregister_hook(&iphook_tab); ! return 0; } static int __init ! cherokee_pf_init(void) { ! printk("%s: Loading %s module ...\n", DEVICE_NAME, DEVICE_NAME); ! if ( init_blk_hash_table() < 0 ) { ! return 0; ! } ! init_pf(); ! init_kuio(); ! init_timer(&pc_alz); ! set_timer(); ! return 0; } static void __exit ! cherokee_pf_exit(void) { ! 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(); ! del_timer(&pc_alz); } ! module_init(cherokee_pf_init); ! module_exit(cherokee_pf_exit); ! module_param(debug, int, 0444); ! MODULE_PARM_DESC(debug, "enable pfilter debug output (default 0 off)"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("jeho park <par...@ho...>"); Index: sysioctl.h =================================================================== RCS file: /cvsroot/netadm/gwc/pf/sysioctl.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sysioctl.h 30 Jan 2006 17:41:25 -0000 1.1.1.1 --- sysioctl.h 17 Feb 2006 06:59:00 -0000 1.2 *************** *** 9,26 **** #ident "@(#) $Header$" ! #ifndef _IOCTLWIBRO_H_ ! #define _IOCTLWIBRO_H_ ! #define IOCTLWIBRO_MAGIC 't' typedef struct { __u32 ip; __u32 max_pktrate; ! } __attribute__ ((packed)) wibro_kuio_msg_t; ! #define IOCTLWIBRO_REGISTER_SRCBLOCK _IO (IOCTLWIBRO_MAGIC, 0) ! #define IOCTLWIBRO_REGISTER_MODSEQ _IO (IOCTLWIBRO_MAGIC, 1) ! #define IOCTLWIBRO_UNREGISTER_HOST _IO (IOCTLWIBRO_MAGIC, 2) ! #define IOCTLWIBRO_MAXNR 3 ! #endif /* _IOCTLWIBRO_H_ */ --- 9,27 ---- #ident "@(#) $Header$" ! #ifndef _IOCTLPF_H_ ! #define _IOCTLPF_H_ ! #define IOCTLPF_MAGIC 't' typedef struct { __u32 ip; __u32 max_pktrate; ! } __attribute__ ((packed)) kuio_msg_t; ! #define IOCTLPF_REGISTER_SRCBLOCK _IO (IOCTLPF_MAGIC, 0) ! #define IOCTLPF_REGISTER_MODSEQ _IO (IOCTLPF_MAGIC, 1) ! #define IOCTLPF_UNREGISTER_HOST _IO (IOCTLPF_MAGIC, 2) ! #define IOCTLPF_REFLESH _IO (IOCTLPF_MAGIC, 3) ! #define IOCTLPF_MAXNR 4 ! #endif /* _IOCTLPF_H_ */ |
From: linuxpark <lin...@us...> - 2006-02-17 06:59:16
|
Update of /cvsroot/netadm/gwc/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16776/scripts Modified Files: gwc Log Message: MOD: 1. Replace current linkedlist in pf to hashtable for better performance. as there are more rules of pf, the performance will be better than linkedlist. it was inspired by route cache in linux of alan cox's debug flag will print the result of pf. 2. Add IOCTLPF_REFLESH from now, only the rules in GUI or cli of pf will be applied only if user click "apply" or hostpol_apply in cli command. TODO: support subnet in "flow control" Index: gwc =================================================================== RCS file: /cvsroot/netadm/gwc/scripts/gwc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gwc 30 Jan 2006 17:41:26 -0000 1.1.1.1 --- gwc 17 Feb 2006 06:59:00 -0000 1.2 *************** *** 163,167 **** start gwcadmd start gwcguid ! insmod ${MODDIR}/pf.ko reload ip_tables reload iptable_filter --- 163,167 ---- start gwcadmd start gwcguid ! insmod ${MODDIR}/pf.ko debug=0 reload ip_tables reload iptable_filter |
From: linuxpark <lin...@us...> - 2006-02-17 06:59:16
|
Update of /cvsroot/netadm/gwc/gwclib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16776/gwclib Modified Files: confproc.c Log Message: MOD: 1. Replace current linkedlist in pf to hashtable for better performance. as there are more rules of pf, the performance will be better than linkedlist. it was inspired by route cache in linux of alan cox's debug flag will print the result of pf. 2. Add IOCTLPF_REFLESH from now, only the rules in GUI or cli of pf will be applied only if user click "apply" or hostpol_apply in cli command. TODO: support subnet in "flow control" Index: confproc.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwclib/confproc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** confproc.c 9 Feb 2006 17:54:06 -0000 1.2 --- confproc.c 17 Feb 2006 06:58:59 -0000 1.3 *************** *** 2218,2224 **** int i; int slot; ! #if 1 int fd; ! wibro_kuio_msg_t msg; int ret; #endif --- 2218,2224 ---- int i; int slot; ! #if 0 int fd; ! kuio_msg_t msg; int ret; #endif *************** *** 2243,2247 **** if (fr->ret != RET_OK) return; ! #if 1 /* 2005. 11. 30 AM: 2, i can't understand why i define the code as #if 0 11. 12 */ /* remove from module */ --- 2243,2247 ---- if (fr->ret != RET_OK) return; ! #if 0 /* 2005. 11. 30 AM: 2, i can't understand why i define the code as #if 0 11. 12 */ /* remove from module */ *************** *** 2253,2257 **** msg.ip = csm->hostpol[i].ip; ! if ((ret = ioctl(fd, IOCTLWIBRO_UNREGISTER_HOST, &msg)) < 0) { if (errno != EBADSLT) { /* EBADSLT is not fatal */ --- 2253,2257 ---- msg.ip = csm->hostpol[i].ip; ! if ((ret = ioctl(fd, IOCTLPF_UNREGISTER_HOST, &msg)) < 0) { if (errno != EBADSLT) { /* EBADSLT is not fatal */ *************** *** 2292,2296 **** hostpol_apply(int argc, char *argv[], int modify, frp_t fr) { ! wibro_kuio_msg_t msg; int fd; int idx; --- 2292,2296 ---- hostpol_apply(int argc, char *argv[], int modify, frp_t fr) { ! kuio_msg_t msg; int fd; int idx; *************** *** 2305,2315 **** } for (i = 0; i < csm->hpolcnt; i++) { switch (csm->hostpol[i].flag) { case BLOCK_HOST: ! idx = IOCTLWIBRO_REGISTER_SRCBLOCK; break; case MODIFY_SEQ: ! idx = IOCTLWIBRO_REGISTER_MODSEQ; break; } --- 2305,2316 ---- } + ioctl (fd, IOCTLPF_REFLESH, 0); for (i = 0; i < csm->hpolcnt; i++) { switch (csm->hostpol[i].flag) { case BLOCK_HOST: ! idx = IOCTLPF_REGISTER_SRCBLOCK; break; case MODIFY_SEQ: ! idx = IOCTLPF_REGISTER_MODSEQ; break; } |
From: linuxpark <lin...@us...> - 2006-02-17 06:59:16
|
Update of /cvsroot/netadm/gwc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16776 Modified Files: CHANGES Log Message: MOD: 1. Replace current linkedlist in pf to hashtable for better performance. as there are more rules of pf, the performance will be better than linkedlist. it was inspired by route cache in linux of alan cox's debug flag will print the result of pf. 2. Add IOCTLPF_REFLESH from now, only the rules in GUI or cli of pf will be applied only if user click "apply" or hostpol_apply in cli command. TODO: support subnet in "flow control" Index: CHANGES =================================================================== RCS file: /cvsroot/netadm/gwc/CHANGES,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CHANGES 9 Feb 2006 18:02:23 -0000 1.3 --- CHANGES 17 Feb 2006 06:58:59 -0000 1.4 *************** *** 1,2 **** --- 1,4 ---- + + Changes in gwc-v0.1-pre2 -------------------------- |
From: linuxpark <lin...@us...> - 2006-02-17 03:06:10
|
Update of /cvsroot/netadm/gwc/gwcguid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16067 Modified Files: fwc.c qos.c Log Message: MOD: modify the location of add button of gwc, qos. Index: fwc.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/fwc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fwc.c 9 Feb 2006 17:54:06 -0000 1.3 --- fwc.c 17 Feb 2006 03:06:03 -0000 1.4 *************** *** 29,32 **** --- 29,34 ---- #include "fwc.h" + extern int nPosX; + extern int nPosY; ErrPktPolicy gErrPktPolicy[MAXSHM_HOST_POL]; char strPolict[2][30] = { "blocking host", "modify TCP header" }; *************** *** 38,44 **** on_errpkt_add(GtkWidget * widget) { - gWinErrAdd = create_windowErrAdd(); gtk_widget_show(gWinErrAdd); } --- 40,46 ---- on_errpkt_add(GtkWidget * widget) { gWinErrAdd = create_windowErrAdd(); gtk_widget_show(gWinErrAdd); + gtk_window_move(GTK_WINDOW(gWinErrAdd), nPosX + 460, nPosY + 325); } Index: qos.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/qos.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** qos.c 9 Feb 2006 17:54:06 -0000 1.3 --- qos.c 17 Feb 2006 03:06:03 -0000 1.4 *************** *** 175,179 **** winFilter = create_window12(); gtk_widget_show(winFilter); ! gtk_window_move(GTK_WINDOW(winFilter), nPosX + 480, nPosY + 335); uOpenQos.isOpenFilter = 1; --- 175,179 ---- winFilter = create_window12(); gtk_widget_show(winFilter); ! gtk_window_move(GTK_WINDOW(winFilter), nPosX + 460, nPosY + 325); uOpenQos.isOpenFilter = 1; *************** *** 200,204 **** winPolicy = create_window13(); gtk_widget_show(winPolicy); ! gtk_window_move(GTK_WINDOW(winPolicy), nPosX + 500, nPosY + 345); comboboxAddPolicyFilter = --- 200,204 ---- winPolicy = create_window13(); gtk_widget_show(winPolicy); ! gtk_window_move(GTK_WINDOW(winPolicy), nPosX + 460, nPosY + 325); comboboxAddPolicyFilter = |
From: linuxpark <lin...@us...> - 2006-02-17 02:48:43
|
Update of /cvsroot/netadm/gwc/gwcguid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8594 Modified Files: interface.c Log Message: FIX: Remove or Fix ugly label Add statusbar Index: interface.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/interface.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** interface.c 9 Feb 2006 17:54:06 -0000 1.6 --- interface.c 17 Feb 2006 02:48:36 -0000 1.7 *************** *** 316,319 **** --- 316,324 ---- gtk_notebook_get_nth_page(GTK_NOTEBOOK (notebook1), 0),label1); + + statusbar1 = gtk_statusbar_new(); + gtk_widget_show(statusbar1); + gtk_box_pack_start(GTK_BOX(vbox1), statusbar1, FALSE, FALSE, 4); + g_signal_connect(G_OBJECT(window1), "destroy", G_CALLBACK(close_event), NULL); *************** *** 387,391 **** GtkWidget *alignment301; GtkWidget *vbox301; - GtkWidget *label302; GtkWidget *frame301; GtkWidget *alignment311; --- 392,395 ---- *************** *** 393,398 **** GtkWidget *vbox308; GtkWidget *hbox307; - GtkWidget *label317; - GtkWidget *label318; GtkWidget *scrolledwindow1; GtkWidget *alignment308; --- 397,400 ---- *************** *** 408,415 **** GtkWidget *vbox309; GtkWidget *hbox309; - GtkWidget *label319; - GtkWidget *label320; - GtkWidget *label321; - GtkWidget *label392; GtkWidget *scrolledwindow2; GtkWidget *alignment309; --- 410,413 ---- *************** *** 444,452 **** gtk_widget_show(vbox301); gtk_container_add(GTK_CONTAINER(alignment301), vbox301); ! ! label302 = gtk_label_new(_("QoS and BandWidth")); ! gtk_widget_show (label302); ! gtk_box_pack_start (GTK_BOX (vbox301), label302, FALSE, FALSE, 1); ! frame301 = gtk_frame_new(NULL); gtk_widget_show(frame301); --- 442,446 ---- gtk_widget_show(vbox301); gtk_container_add(GTK_CONTAINER(alignment301), vbox301); ! frame301 = gtk_frame_new(NULL); gtk_widget_show(frame301); *************** *** 470,485 **** gtk_box_pack_start(GTK_BOX(vbox308), hbox307, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox307), 5); ! ! label317 = ! gtk_label_new(_(" Class Name ")); ! gtk_widget_show (label317); ! gtk_box_pack_start(GTK_BOX(hbox307), label317, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label317, 185, -1); ! ! label318 = gtk_label_new(_("Bandwidth(%)")); ! gtk_widget_show (label318); ! gtk_box_pack_start(GTK_BOX(hbox307), label318, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label318, 118, -1); ! scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow1); --- 464,468 ---- gtk_box_pack_start(GTK_BOX(vbox308), hbox307, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox307), 5); ! scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow1); *************** *** 543,558 **** gtk_box_pack_start(GTK_BOX(vbox308), hbox307, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox307), 5); ! ! label317 = ! gtk_label_new(_(" Class Name ")); ! gtk_widget_show (label317); ! gtk_box_pack_start(GTK_BOX(hbox307), label317, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label317, 185, -1); ! ! label318 = gtk_label_new(_("Bandwidth(%)")); ! gtk_widget_show (label318); ! gtk_box_pack_start(GTK_BOX(hbox307), label318, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label318, 118, -1); ! scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow1); --- 526,530 ---- gtk_box_pack_start(GTK_BOX(vbox308), hbox307, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox307), 5); ! scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow1); *************** *** 618,642 **** gtk_box_pack_start(GTK_BOX(vbox309), hbox309, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox309), 5); ! ! label319 = gtk_label_new(_(" Filter Name ")); ! gtk_widget_show (label319); ! gtk_box_pack_start(GTK_BOX(hbox309), label319, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label319, 100, -1); ! ! label320 = gtk_label_new(_(" Type ")); ! gtk_widget_show (label320); ! gtk_box_pack_start(GTK_BOX(hbox309), label320, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label320, 60, -1); ! ! label321 = gtk_label_new(_(" Detail ")); ! gtk_widget_show (label321); ! gtk_box_pack_start(GTK_BOX(hbox309), label321, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label321, 60, -1); ! ! label392 = gtk_label_new(_(" Port")); ! gtk_widget_show (label392); ! gtk_box_pack_start(GTK_BOX(hbox309), label392, FALSE, FALSE, 0); ! gtk_widget_set_size_request(label392, 70, -1); ! scrolledwindow2 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow2); --- 590,594 ---- gtk_box_pack_start(GTK_BOX(vbox309), hbox309, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox309), 5); ! scrolledwindow2 = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(scrolledwindow2); *************** *** 809,813 **** GLADE_HOOKUP_OBJECT(window1, alignment301, "alignment301"); GLADE_HOOKUP_OBJECT(window1, vbox301, "vbox301"); - GLADE_HOOKUP_OBJECT(window1, label302, "label302"); GLADE_HOOKUP_OBJECT(window1, frame301, "frame301"); GLADE_HOOKUP_OBJECT(window1, alignment311, "alignment311"); --- 761,764 ---- *************** *** 815,820 **** GLADE_HOOKUP_OBJECT(window1, vbox308, "vbox308"); GLADE_HOOKUP_OBJECT(window1, hbox307, "hbox307"); - GLADE_HOOKUP_OBJECT(window1, label317, "label317"); - GLADE_HOOKUP_OBJECT(window1, label318, "label318"); GLADE_HOOKUP_OBJECT(window1, scrolledwindow1, "scrolledwindow1"); GLADE_HOOKUP_OBJECT(window1, alignment308, "alignment308"); --- 766,769 ---- *************** *** 828,834 **** GLADE_HOOKUP_OBJECT(window1, vbox309, "vbox309"); GLADE_HOOKUP_OBJECT(window1, hbox309, "hbox309"); - GLADE_HOOKUP_OBJECT(window1, label319, "label319"); - GLADE_HOOKUP_OBJECT(window1, label320, "label320"); - GLADE_HOOKUP_OBJECT(window1, label321, "label321"); GLADE_HOOKUP_OBJECT(window1, scrolledwindow2, "scrolledwindow2"); GLADE_HOOKUP_OBJECT(window1, alignment309, "alignment309"); --- 777,780 ---- *************** *** 1496,1500 **** GLADE_HOOKUP_OBJECT(window2, label98[i], strLabel98); ! } // end of for i // ######################################################################## --- 1442,1446 ---- GLADE_HOOKUP_OBJECT(window2, label98[i], strLabel98); ! } // ######################################################################## *************** *** 1541,1568 **** GLADE_HOOKUP_OBJECT(window2, label96, "label96"); GLADE_HOOKUP_OBJECT(window2, label97, "label97"); ! /* GLADE_HOOKUP_OBJECT (window2, entryIfIndex, "entryIfIndex"); ! GLADE_HOOKUP_OBJECT (window2, entryIfDesc, "entryIfDesc"); ! GLADE_HOOKUP_OBJECT (window2, entryIfType, "entryIfType"); ! GLADE_HOOKUP_OBJECT (window2, entryIfMtu, "entryIfMtu"); ! GLADE_HOOKUP_OBJECT (window2, entryIfSpeed, "entryIfSpeed"); ! GLADE_HOOKUP_OBJECT (window2, entryIfPhyAddr, "entryIfPhyAddr"); ! GLADE_HOOKUP_OBJECT (window2, entryIfAdminStat, "entryIfAdminStat"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOperStat, "entryIfOperStat"); ! GLADE_HOOKUP_OBJECT (window2, entryIfLastChange, "entryIfLastChange"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInOctet, "entryIfInOctet"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInUCastPkt, "entryIfInUCastPkt"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInNUCastPkt, "entryIfInNUCastPkt"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInDiscard, "entryIfInDiscard"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInError, "entryIfInError"); ! GLADE_HOOKUP_OBJECT (window2, entryIfInUnknownProto, "entryIfInUnknownProto"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutOctet, "entryIfOutOctet"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutUCastPacket, "entryIfOutUCastPacket"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutNUCastPkt, "entryIfOutNUCastPkt"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutDiscard, "entryIfOutDiscard"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutDiscard, "entryIfOutOutError"); ! GLADE_HOOKUP_OBJECT (window2, entryIfOutQlen, "entryIfOutQlen"); ! GLADE_HOOKUP_OBJECT (window2, entryIfSpecific, "entryIfSpecific"); ! GLADE_HOOKUP_OBJECT (window2, label98, "label98"); ! */ GLADE_HOOKUP_OBJECT(window2, alignment10, "alignment10"); GLADE_HOOKUP_OBJECT(window2, hbox12, "hbox12"); GLADE_HOOKUP_OBJECT(window2, btnIfClose, "btnIfClose"); --- 1487,1491 ---- GLADE_HOOKUP_OBJECT(window2, label96, "label96"); GLADE_HOOKUP_OBJECT(window2, label97, "label97"); ! GLADE_HOOKUP_OBJECT(window2, alignment10, "alignment10"); GLADE_HOOKUP_OBJECT(window2, hbox12, "hbox12"); GLADE_HOOKUP_OBJECT(window2, btnIfClose, "btnIfClose"); *************** *** 2944,2965 **** // modified ############################################################ - /* - entryUdpLocalAddress = gtk_entry_new (); - gtk_widget_show (entryUdpLocalAddress); - gtk_table_attach (GTK_TABLE (table6), entryUdpLocalAddress, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_size_request (entryUdpLocalAddress, 100, 25); - gtk_editable_set_editable (GTK_EDITABLE (entryUdpLocalAddress), FALSE); - - entryUdpLocalPort = gtk_entry_new (); - gtk_widget_show (entryUdpLocalPort); - gtk_table_attach (GTK_TABLE (table6), entryUdpLocalPort, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_EXPAND), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_size_request (entryUdpLocalPort, 100, 25); - gtk_editable_set_editable (GTK_EDITABLE (entryUdpLocalPort), FALSE); - */ - static char strUdpLocalAddress[50]; static char strUdpLocalPort[50]; --- 2867,2870 ---- *************** *** 2995,3000 **** } ! // end of modified ###################################################### ! label165 = gtk_label_new(_("index #1")); gtk_widget_show(label165); --- 2900,2904 ---- } ! // end of modified ################################################### label165 = gtk_label_new(_("index #1")); gtk_widget_show(label165); *************** *** 3105,3109 **** static char strSpinBtnOfdm[15]; static char strSpinBtnClient[15]; - //static char strFrameName[15]; sprintf(strLabel4, "label4_%d", i); --- 3009,3012 ---- *************** *** 3111,3115 **** sprintf(strSpinBtnOfdm, "spinbtnOfdm%d", i); sprintf(strSpinBtnClient, "spinbtnClient%d", i); - //sprintf(strFrameName, ""); framePwrSide[i] = gtk_frame_new(NULL); --- 3014,3017 ---- |
From: park j. <par...@ho...> - 2006-02-15 16:37:00
|
hi EP8KHA if you are not busy too much, i want to ask you to check my english in http://netadm.sf.net for example index.html, Quick Installation [linux] (fast.html), TODO (todo.html) in netadm.sf.net if you find any wrong spelling or syntax which i wrote, fix it please. [howto] following shows simple example of modifying web document in netadm.sf.net $wget http://netadm.sf.net/acvs.html /* fix any error */ $scp acvs.html YO...@sh...:/home/groups/n/ne/netadm/htdocs YO...@sh...'s password: /* enter your password */ that's all p.s: how about researching the snort ? do you keep researching that ? thanks |
From: park j. <par...@ho...> - 2006-02-13 21:15:30
|
MODIFY: Anonymous CVS download in http://netadm.sf.net - make more short MODIFY: Documentation/Developer API - this must be convert to html format ... NEW : Fast download & install [ in linux ] - it will be helpful to beginner. |
From: park j. <par...@ho...> - 2006-02-13 21:09:15
|
http://netadm.sourceforge.net/"Fast download & install [ in linux ]" URL: http://netadm.sourceforge.net/fast.txt |
From: park j. <par...@ho...> - 2006-02-13 18:31:11
|
hi ep8kha i modified your permission in our project to be able to write cvs source. so if you find any bug, i hope you to fix that. (^-^ thanks |
From: 똥꼬 <lin...@us...> - 2006-02-12 18:45:19
|
Update of /cvsroot/netadm/gwc/gwcadmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8043 Modified Files: main.c Log Message: FIX: sometime show_kversion return -1 in kernel 2.6.x, so i fix this, but i think this is not tested sufficiently. Index: main.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcadmd/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.c 5 Feb 2006 13:18:30 -0000 1.4 --- main.c 12 Feb 2006 18:45:11 -0000 1.5 *************** *** 899,904 **** show_kversion (void) { struct utsname uts; - char *c; - char kver[4]; if ( uname (&uts) < 0 ) { --- 899,902 ---- *************** *** 906,928 **** } else { ! strncpy (kver, uts.release, 3); ! ! if ( !strcmp (kver, "2.6")) ! printf ("%s\n", kver); ! ! else if ( !strcmp (kver, "2.4")) { ! c = strchr (uts.release, '.'); ! ++c; ! c = strchr (c, '.'); ! ++c; ! bzero (kver, sizeof (kver)); ! strncpy (kver, c, 2); ! if ( atoi (kver) < 20 ) ! printf ("%d\n", -1); ! else ! printf ("2.4\n"); ! } ! else ! printf ("%d\n", -1); } } --- 904,908 ---- } else { ! printf ("%.3s\n", uts.release); } } |
From: park j. <par...@ho...> - 2006-02-12 14:21:28
|
hi ep8kha >From: "EP8KHA EP8KHA" <ep...@ho...> >To: par...@ho... >Subject: netadm Date: Sun, 12 Feb 2006 05:10:34 -0500 > >Hi, >I just joined the netadm-devel mailing list. good ! >Also, what would be the best way to contact you? Do you use irc, msn, or >aim? i use gaim, so register my email address par...@ho... >I'll definitely be anticipating the netadm documentation so I can get a >clear understanding of how the system works. Thanks ^_^ as i said previously, i am writing API manual for developer. http://netadm.sourceforge.net/devel_api.txt it may be helpful to you and later joiner but it will be finished a week later. i am not sure when the work is done. :-( i am so lazy as you guess, gwc program was made with a lot of small library functions so i will recommand other joiner use these internal function, or make his own library funcion. you can verify it in gwc/gwclib directory. most of all, do you have interest in IDS (intrusion detection system) ? because i want to use the IDS engine of snort (www.snort.org) during next upgrading gwc last snort version may support hook function which will let use IDS engine. if you have interest in this, i recommand you first research snort. then at the time you become familiar with snort, i will finish making documents if current gwc will include ids engine, and implement user interface, gwc will be some of IPS (Intrusion Prevention System) do you have any good idear? if so, let me know bye ~ > >EP8KHA > >_________________________________________________________________ >Dont just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > |
From: 똥꼬 <lin...@us...> - 2006-02-09 18:02:44
|
Update of /cvsroot/netadm/gwc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27716 Modified Files: CHANGES Log Message: ADD: change log Index: CHANGES =================================================================== RCS file: /cvsroot/netadm/gwc/CHANGES,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGES 6 Feb 2006 19:28:24 -0000 1.2 --- CHANGES 9 Feb 2006 18:02:23 -0000 1.3 *************** *** 1,2 **** --- 1,6 ---- + Changes in gwc-v0.1-pre2 + -------------------------- + FIX: error during deleting object + etc Changes in pre-gwc-v0.1 |
From: 똥꼬 <lin...@us...> - 2006-02-09 17:54:16
|
Update of /cvsroot/netadm/gwc/gwcguid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/gwcguid Modified Files: fwc.c fwc.h interface.c qos.c qos.h Log Message: FIX: fix deleting error. redefine object size of QoS, flow control policy. etc Index: fwc.h =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/fwc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** fwc.h 30 Jan 2006 17:41:29 -0000 1.1.1.1 --- fwc.h 9 Feb 2006 17:54:06 -0000 1.2 *************** *** 11,31 **** #ifndef __ERRPKT_H__ #define __ERRPKT_H__ ! #ifndef OL ! #define OL 16 ! #endif ! typedef struct { ! char name[20]; ! char ip[20]; ! char policy[40]; char rate[OL]; } ErrPktPolicy; ! extern ErrPktPolicy gErrPktPolicy[30]; extern char strPolict[2][30]; extern int gPolicyIndex; - extern GtkWidget *gWinErrAdd; - void on_errpkt_add(GtkWidget * widget); void on_errpkt_delete(GtkWidget * widget); --- 11,27 ---- #ifndef __ERRPKT_H__ #define __ERRPKT_H__ ! #include "sysshm.h" ! typedef struct { ! char name[DL]; ! char ip[DL]; ! char policy[DL]; char rate[OL]; } ErrPktPolicy; ! extern ErrPktPolicy gErrPktPolicy[]; extern char strPolict[2][30]; extern int gPolicyIndex; extern GtkWidget *gWinErrAdd; void on_errpkt_add(GtkWidget * widget); void on_errpkt_delete(GtkWidget * widget); Index: qos.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/qos.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** qos.c 31 Jan 2006 14:51:58 -0000 1.2 --- qos.c 9 Feb 2006 17:54:06 -0000 1.3 *************** *** 15,26 **** #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> - #include <stdlib.h> #include <stdio.h> #include <string.h> - #include "callback.h" - #include "interface.h" - #include "support.h" - #include "apc.h" #include <sys/socket.h> #include <netinet/in.h> --- 15,21 ---- *************** *** 28,32 **** #include <arpa/inet.h> #include "sysipc.h" ! #include "sysshm.h" #include "qos.h" --- 23,30 ---- #include <arpa/inet.h> #include "sysipc.h" ! #include "callback.h" ! #include "interface.h" ! #include "support.h" ! #include "apc.h" #include "qos.h" *************** *** 36,58 **** extern int nPosY; // global variable ! QosBand uQosBand[MAX_BAND_SIZE]; ! QosClass uQosClass[MAX_CLASS_SIZE]; ! QosFilter uQosFilter[MAX_FILTER_SIZE]; ! QosPolicy uQosPolicy[MAX_POLICY_SIZE]; OpenQos uOpenQos; QosSize uQosSize; ! char band_interface[30][20]; ! char class_interface[30][20]; ! char qosTos[5][MAX_CHAR_LENGTH] = { "MD", "MT", "MR", "MMC", "NS" }; char qosProto[2][MAX_CHAR_LENGTH] = { "TCP", "UDP" }; - char delBand[30]; - char delClass[30]; - char delFilter[30]; - char delPolicy[30]; - - // initilization Qos function void init_Qos(GtkWidget * window) --- 34,53 ---- extern int nPosY; // global variable ! QosBand uQosBand[MAXSHM_IF]; ! QosClass uQosClass[MAXSHM_TC_CLASS]; ! QosFilter uQosFilter[MAXSHM_TC_FILTER]; ! QosPolicy uQosPolicy[MAXSHM_TC_POL]; OpenQos uOpenQos; QosSize uQosSize; ! char band_interface[MAXSHM_IF][DL]; ! char class_interface[MAXSHM_TC_CLASS][DL]; char qosTos[5][MAX_CHAR_LENGTH] = { "MD", "MT", "MR", "MMC", "NS" }; char qosProto[2][MAX_CHAR_LENGTH] = { "TCP", "UDP" }; + char delBand[DL]; + char delClass[DL]; + char delFilter[DL]; + char delPolicy[DL]; void init_Qos(GtkWidget * window) *************** *** 60,65 **** int i; - // data initilization - // all string format size is sixteen for (i = 0; i < 50; i++) { --- 55,58 ---- *************** *** 97,101 **** } - // size init uQosSize.sizeBand = 0; uQosSize.sizeClass = 0; --- 90,93 ---- *************** *** 104,113 **** } - // when timeout, refresh the Qos part void on_timeout_Qos(void) { - // - // get data and display each list display_Band(winMain); display_Class(winMain); --- 96,102 ---- *************** *** 116,120 **** } - // apply QOS void apply_Qos(GtkWidget * widget) --- 105,108 ---- *************** *** 136,140 **** } - // open_winBandAdd void open_winBand(GtkWidget * widget, GtkWidget * window) --- 124,127 ---- *************** *** 157,161 **** } - // open class add window void open_winClass(GtkWidget * widget, GtkWidget * window) --- 144,147 ---- *************** *** 178,182 **** } - // open filter add window void open_winFilter(GtkWidget * widget, GtkWidget * window) --- 164,167 ---- *************** *** 196,208 **** } - // opem policy add window void open_winPolicy(GtkWidget * widget, GtkWidget * window) { if (uOpenQos.isOpenPolicy == 1) return; - // need Class and Filter if ((uQosSize.sizeClass == 0) || (uQosSize.sizeFilter == 0)) { --- 181,195 ---- } void open_winPolicy(GtkWidget * widget, GtkWidget * window) { + int i; + GtkWidget *winPolicy; + GtkWidget *comboboxAddPolicyFilter; + GtkWidget *comboboxAddPolicyClass; if (uOpenQos.isOpenPolicy == 1) return; if ((uQosSize.sizeClass == 0) || (uQosSize.sizeFilter == 0)) { *************** *** 211,219 **** } - int i; - GtkWidget *winPolicy; - GtkWidget *comboboxAddPolicyFilter; - GtkWidget *comboboxAddPolicyClass; - winPolicy = create_window13(); gtk_widget_show(winPolicy); --- 198,201 ---- *************** *** 225,229 **** lookup_widget(GTK_WIDGET(winPolicy), "comboboxAddPolicyClass"); - // fill combobox with current data for (i = 0; i < get_Filter(); i++) { --- 207,210 ---- *************** *** 245,249 **** } - // close winBand void close_winBand(GtkWidget * widget, GtkWidget * window) --- 226,229 ---- *************** *** 255,259 **** } - // close winClass void close_winClass(GtkWidget * widget, GtkWidget * window) --- 235,238 ---- *************** *** 265,269 **** } - // close winFilter void close_winFilter(GtkWidget * widget, GtkWidget * window) --- 244,247 ---- *************** *** 275,279 **** } - // close winPolicy void close_winPolicy(GtkWidget * widget, GtkWidget * window) --- 253,256 ---- *************** *** 332,337 **** } - // PART #2 - // << internal function >> int get_band_interface(void) --- 309,312 ---- *************** *** 351,355 **** for (i = 0; i < row; i++) { - strcpy(band_interface[i], list[i]); } --- 326,329 ---- *************** *** 382,386 **** } - // get QoS band list int get_Band() --- 356,359 ---- *************** *** 409,413 **** } - // get QoS class list int get_Class() --- 382,385 ---- *************** *** 437,441 **** } - // get QoS filter list int get_Filter() --- 409,412 ---- *************** *** 466,470 **** } - // get Qos Plicy list int get_Policy() --- 437,440 ---- *************** *** 496,500 **** } - // displat band list void display_Band(GtkWidget * widget) --- 466,469 ---- *************** *** 504,508 **** int result; - // get list result = get_Band(); --- 473,476 ---- *************** *** 511,515 **** gtk_clist_clear((GtkCList *) clist); - // 20051205 hyoseok if (result == 0) return; --- 479,482 ---- *************** *** 531,535 **** } - // displat class list void display_Class(GtkWidget * widget) --- 498,501 ---- *************** *** 539,543 **** int result; - // get list result = get_Class(); --- 505,508 ---- *************** *** 546,550 **** gtk_clist_clear((GtkCList *) clist); - // 20051205 hyoseok if (result == 0) return; --- 511,514 ---- *************** *** 569,573 **** } - //display filter list void display_Filter(GtkWidget * widget) --- 533,536 ---- *************** *** 577,581 **** int result; - // get list result = get_Filter(); --- 540,543 ---- *************** *** 610,614 **** } - //display ploicy list void display_Policy(GtkWidget * widget) --- 572,575 ---- *************** *** 618,622 **** int result; - // get list result = get_Policy(); --- 579,582 ---- *************** *** 694,698 **** } - // add class data void add_Class(GtkWidget * widget, GtkWidget * window) --- 654,657 ---- *************** *** 757,767 **** GtkWidget *comboboxAddFilterProto; GtkWidget *entryAddFilterPort; - - // temprory receive value int radio; int comboTos; int comboProto; - - // temprory string char tName[OL]; char tPort[OL]; --- 716,722 ---- *************** *** 930,942 **** remove_Band(GtkWidget * widget) { - char *error = NULL; - error = syscmd(CMD_DEL_TC_MAXBW, delBand, EOA); if (error != NULL) { - userwin(USERWIN_ERROR,error); } - syscmdfree(error); on_timeout_Qos(); --- 885,893 ---- *************** *** 999,1011 **** void ! band_selected(GtkCList * list, gint r, gint c, GdkEventButton * event, gpointer data) { ! int i; ! char **str; ! ! i = gtk_clist_get_text((GtkCList *) list, r, 0, str); ! strcpy(delBand, *str); } --- 950,960 ---- void ! band_selected(GtkCList * list, gint row, gint column, GdkEventButton * event, gpointer data) { + gchar *text; ! gtk_clist_get_text((GtkCList *) list, row, 0, &text); ! strcpy(delBand, text); } *************** *** 1014,1023 **** gpointer data) { ! int i; ! char **str; ! ! i = gtk_clist_get_text((GtkCList *) list, r, 0, str); ! strcpy(delClass, *str); } --- 963,970 ---- gpointer data) { + gchar *text; ! gtk_clist_get_text((GtkCList *) list, r, 0, &text); ! strcpy(delClass, text); } *************** *** 1026,1035 **** gpointer data) { ! int i; ! char **str; ! ! i = gtk_clist_get_text((GtkCList *) list, r, 0, str); ! strcpy(delFilter, *str); } --- 973,980 ---- gpointer data) { + gchar *text; ! gtk_clist_get_text((GtkCList *) list, r, 0, &text); ! strcpy(delFilter, text); } *************** *** 1038,1046 **** gpointer data) { ! int i; ! char **str; ! ! i = gtk_clist_get_text((GtkCList *) list, r, 0, str); ! strcpy(delPolicy, *str); } --- 983,989 ---- gpointer data) { + gchar *text; ! gtk_clist_get_text((GtkCList *) list, r, 0, &text); ! strcpy(delPolicy, text); } Index: fwc.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/fwc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fwc.c 31 Jan 2006 14:51:58 -0000 1.2 --- fwc.c 9 Feb 2006 17:54:06 -0000 1.3 *************** *** 15,37 **** #include <stdio.h> #include <stdlib.h> - #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> ! #include "callback.h" #include "interface.h" #include "support.h" ! #include "qos.h" #include "fwc.h" - #include "sysipc.h" ! // global variable ! ErrPktPolicy gErrPktPolicy[30]; char strPolict[2][30] = { "blocking host", "modify TCP header" }; int gPolicyIndex = 0; - GtkWidget *gWinErrAdd; ! ! char delRow[20]; void --- 15,37 ---- #include <stdio.h> #include <stdlib.h> #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> ! #include <sys/socket.h> ! #include <netinet/in.h> ! #include <netinet/ip.h> ! #include <arpa/inet.h> ! #include "sysshm.h" ! #include "sysipc.h" #include "callback.h" #include "interface.h" #include "support.h" ! //#include "qos.h" #include "fwc.h" ! ErrPktPolicy gErrPktPolicy[MAXSHM_HOST_POL]; char strPolict[2][30] = { "blocking host", "modify TCP header" }; int gPolicyIndex = 0; GtkWidget *gWinErrAdd; ! char delRow[DL]; void *************** *** 187,206 **** errpkt_delete(char *delName) { ! gPolicyIndex--; ! ! char *error = NULL; ! ! // code here ! error = syscmd(CMD_DEL_HOSTPOL, delRow, EOA); ! if (error != NULL) { ! userwin( USERWIN_ERROR, error); ! set_item_statusbar("delete Hostpol Error"); ! return; ! } ! syscmdfree(error); ! update_errpkt((GtkWidget *) winMain); } --- 187,208 ---- errpkt_delete(char *delName) { + gPolicyIndex--; + char *error = NULL; ! if (!strlen (delRow)) { ! userwin( USERWIN_ERROR, "error: select a item to delete"); ! return; ! } ! error = syscmd(CMD_DEL_HOSTPOL, delRow, EOA); ! if (error != NULL) { ! userwin( USERWIN_ERROR, error); ! set_item_statusbar("delete Hostpol Error"); ! return; ! } ! syscmdfree(error); ! bzero (delRow, sizeof (delRow)); ! update_errpkt((GtkWidget *) winMain); } *************** *** 227,238 **** void ! err_selected(GtkCList * list, gint r, gint c, GdkEventButton * event, gpointer data) { ! ! int i; ! char **str; ! ! i = gtk_clist_get_text((GtkCList *) list, r, 0, str); ! strcpy(delRow, *str); } --- 229,238 ---- void ! err_selected(GtkCList * list, gint row, gint column, GdkEventButton * event, gpointer data) { ! gchar *text; ! ! gtk_clist_get_text(GTK_CLIST(list), row, 0, &text); ! strcpy(delRow, text); } Index: qos.h =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/qos.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** qos.h 30 Jan 2006 17:41:29 -0000 1.1.1.1 --- qos.h 9 Feb 2006 17:54:06 -0000 1.2 *************** *** 10,24 **** #ifndef __WIBROQOS_H_ #define __WIBROQOS_H_ - // definition - #define MAX_BAND_SIZE 50 - #define MAX_CLASS_SIZE 50 - #define MAX_FILTER_SIZE 50 - #define MAX_POLICY_SIZE 50 - - #define MAX_CHAR_LENGTH 16 - - // type definition for QoS - // Bandwidth typedef struct { --- 10,16 ---- #ifndef __WIBROQOS_H_ #define __WIBROQOS_H_ + #include "sysshm.h" + #define MAX_CHAR_LENGTH DL typedef struct { *************** *** 26,32 **** char *maxBandwidth; } QosBand; ! extern QosBand uQosBand[MAX_BAND_SIZE]; - // Class typedef struct { --- 18,23 ---- char *maxBandwidth; } QosBand; ! extern QosBand uQosBand[]; typedef struct { *************** *** 35,43 **** char *interface; } QosClass; ! extern QosClass uQosClass[MAX_CLASS_SIZE]; - // Filter typedef struct { - char *name; char *type; --- 26,32 ---- char *interface; } QosClass; ! extern QosClass uQosClass[]; typedef struct { char *name; char *type; *************** *** 45,51 **** char *port; } QosFilter; ! extern QosFilter uQosFilter[MAX_FILTER_SIZE]; - // Policy typedef struct { --- 34,39 ---- char *port; } QosFilter; ! extern QosFilter uQosFilter[]; typedef struct { *************** *** 56,60 **** char *mark; } QosPolicy; ! extern QosPolicy uQosPolicy[MAX_POLICY_SIZE]; typedef struct { --- 44,48 ---- char *mark; } QosPolicy; ! extern QosPolicy uQosPolicy[]; typedef struct { *************** *** 75,131 **** } QosSize; extern QosSize uQosSize; ! ! extern char band_interface[30][20]; ! extern char class_interface[30][20]; ! extern char qosTos[5][MAX_CHAR_LENGTH]; extern char qosProto[2][MAX_CHAR_LENGTH]; - // useful function - // PART # - // << callback function >> void open_winBand(GtkWidget * widget, GtkWidget * window); void open_winClass(GtkWidget * widget, GtkWidget * window); void open_winFilter(GtkWidget * widget, GtkWidget * window); void open_winPolicy(GtkWidget * widget, GtkWidget * window); - void close_winBand(GtkWidget * widget, GtkWidget * window); void close_winClass(GtkWidget * widget, GtkWidget * window); void close_winFilter(GtkWidget * widget, GtkWidget * window); void close_winPolicy(GtkWidget * widget, GtkWidget * window); - void active_radioType(GtkWidget * widget, GtkWidget * window); void active_radioUMark(GtkWidget * widget, GtkWidget * window); - - // PART #2 - // << internal function >> - void init_Qos(GtkWidget * window); void on_timeout_Qos(void); - void apply_Qos(GtkWidget * widget); - int get_Band(); int get_Class(); int get_Filter(); int get_Policy(); - int get_band_interface(void); int get_class_interface(void); - void display_Band(GtkWidget * widget); void display_Class(GtkWidget * widget); void display_Filter(GtkWidget * widget); void display_Policy(GtkWidget * widget); - void add_Band(GtkWidget * widget, GtkWidget * window); void add_Class(GtkWidget * widget, GtkWidget * window); void add_Filter(GtkWidget * widget, GtkWidget * window); void add_Policy(GtkWidget * widget, GtkWidget * window); - void remove_Band(GtkWidget * widget); void remove_Class(GtkWidget * widget); void remove_Filter(GtkWidget * widget); void remove_Policy(GtkWidget * widget); - void band_selected(GtkCList * list, gint r, gint c, GdkEventButton * event, gpointer data); --- 63,101 ---- } QosSize; extern QosSize uQosSize; ! extern char band_interface[MAXSHM_IF][DL]; ! extern char class_interface[MAXSHM_TC_CLASS][DL]; extern char qosTos[5][MAX_CHAR_LENGTH]; extern char qosProto[2][MAX_CHAR_LENGTH]; void open_winBand(GtkWidget * widget, GtkWidget * window); void open_winClass(GtkWidget * widget, GtkWidget * window); void open_winFilter(GtkWidget * widget, GtkWidget * window); void open_winPolicy(GtkWidget * widget, GtkWidget * window); void close_winBand(GtkWidget * widget, GtkWidget * window); void close_winClass(GtkWidget * widget, GtkWidget * window); void close_winFilter(GtkWidget * widget, GtkWidget * window); void close_winPolicy(GtkWidget * widget, GtkWidget * window); void active_radioType(GtkWidget * widget, GtkWidget * window); void active_radioUMark(GtkWidget * widget, GtkWidget * window); void init_Qos(GtkWidget * window); void on_timeout_Qos(void); void apply_Qos(GtkWidget * widget); int get_Band(); int get_Class(); int get_Filter(); int get_Policy(); int get_band_interface(void); int get_class_interface(void); void display_Band(GtkWidget * widget); void display_Class(GtkWidget * widget); void display_Filter(GtkWidget * widget); void display_Policy(GtkWidget * widget); void add_Band(GtkWidget * widget, GtkWidget * window); void add_Class(GtkWidget * widget, GtkWidget * window); void add_Filter(GtkWidget * widget, GtkWidget * window); void add_Policy(GtkWidget * widget, GtkWidget * window); void remove_Band(GtkWidget * widget); void remove_Class(GtkWidget * widget); void remove_Filter(GtkWidget * widget); void remove_Policy(GtkWidget * widget); void band_selected(GtkCList * list, gint r, gint c, GdkEventButton * event, gpointer data); Index: interface.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwcguid/interface.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** interface.c 5 Feb 2006 13:18:31 -0000 1.5 --- interface.c 9 Feb 2006 17:54:06 -0000 1.6 *************** *** 279,283 **** gtk_box_pack_start(GTK_BOX(hbox6), label19, FALSE, FALSE, 0); ! btnMonIpInfo = gtk_button_new_with_mnemonic(_("ipinfo")); gtk_widget_show(btnMonIpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonIpInfo, FALSE, FALSE, 0); --- 279,283 ---- gtk_box_pack_start(GTK_BOX(hbox6), label19, FALSE, FALSE, 0); ! btnMonIpInfo = gtk_button_new_with_mnemonic(_("IP info")); gtk_widget_show(btnMonIpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonIpInfo, FALSE, FALSE, 0); *************** *** 288,292 **** gtk_box_pack_start(GTK_BOX(hbox6), label20, FALSE, FALSE, 0); ! btnMonTcpInfo = gtk_button_new_with_mnemonic(_("tcpinfo")); gtk_widget_show(btnMonTcpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonTcpInfo, FALSE, FALSE, 0); --- 288,292 ---- gtk_box_pack_start(GTK_BOX(hbox6), label20, FALSE, FALSE, 0); ! btnMonTcpInfo = gtk_button_new_with_mnemonic(_("TCP info")); gtk_widget_show(btnMonTcpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonTcpInfo, FALSE, FALSE, 0); *************** *** 297,301 **** gtk_box_pack_start(GTK_BOX(hbox6), label21, FALSE, FALSE, 0); ! btnMonUdpInfo = gtk_button_new_with_mnemonic(_("udpinfo")); gtk_widget_show(btnMonUdpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonUdpInfo, FALSE, FALSE, 0); --- 297,301 ---- gtk_box_pack_start(GTK_BOX(hbox6), label21, FALSE, FALSE, 0); ! btnMonUdpInfo = gtk_button_new_with_mnemonic(_("UDP info")); gtk_widget_show(btnMonUdpInfo); gtk_box_pack_start(GTK_BOX(hbox6), btnMonUdpInfo, FALSE, FALSE, 0); *************** *** 794,807 **** G_CALLBACK(apply_Qos), (GtkWidget *) window1); ! gtk_signal_connect(GTK_OBJECT(clist105), "select-row", GTK_SIGNAL_FUNC(band_selected), NULL); ! gtk_signal_connect(GTK_OBJECT(clist101), "select-row", GTK_SIGNAL_FUNC(class_selected), NULL); ! gtk_signal_connect(GTK_OBJECT(clist102), "select-row", GTK_SIGNAL_FUNC(filter_selected), NULL); ! gtk_signal_connect(GTK_OBJECT(clist103), "select-row", GTK_SIGNAL_FUNC(policy_selected), NULL); --- 794,807 ---- G_CALLBACK(apply_Qos), (GtkWidget *) window1); ! g_signal_connect(GTK_OBJECT(clist105), "select-row", GTK_SIGNAL_FUNC(band_selected), NULL); ! g_signal_connect(GTK_OBJECT(clist101), "select-row", GTK_SIGNAL_FUNC(class_selected), NULL); ! g_signal_connect(GTK_OBJECT(clist102), "select-row", GTK_SIGNAL_FUNC(filter_selected), NULL); ! g_signal_connect(GTK_OBJECT(clist103), "select-row", GTK_SIGNAL_FUNC(policy_selected), NULL); *************** *** 908,912 **** gtk_container_add(GTK_CONTAINER(scrolledwindow701), clist1); ! label702 = gtk_label_new(_("<b>Polish</b>")); gtk_widget_show(label702); gtk_frame_set_label_widget(GTK_FRAME(frame701), label702); --- 908,912 ---- gtk_container_add(GTK_CONTAINER(scrolledwindow701), clist1); ! label702 = gtk_label_new(_("<b>Policy</b>")); gtk_widget_show(label702); gtk_frame_set_label_widget(GTK_FRAME(frame701), label702); *************** *** 4045,4049 **** gtk_box_pack_start(GTK_BOX(hbox5), label23, FALSE, FALSE, 0); - ////////////////////////////////////////////////////////////////////// g_signal_connect(G_OBJECT(btnAddPolicy), "clicked", G_CALLBACK(add_Policy), (GtkWidget *) window13); --- 4045,4048 ---- *************** *** 4224,4228 **** windowErrAdd = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(windowErrAdd), _("add error packet")); alignment4 = gtk_alignment_new(0.5, 0.5, 1, 1); --- 4223,4227 ---- windowErrAdd = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_window_set_title(GTK_WINDOW(windowErrAdd), _("Add Policy")); alignment4 = gtk_alignment_new(0.5, 0.5, 1, 1); |
From: 똥꼬 <lin...@us...> - 2006-02-09 17:54:14
|
Update of /cvsroot/netadm/gwc/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/include Modified Files: sysshm.h Log Message: FIX: fix deleting error. redefine object size of QoS, flow control policy. etc Index: sysshm.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/sysshm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sysshm.h 31 Jan 2006 14:19:38 -0000 1.2 --- sysshm.h 9 Feb 2006 17:54:06 -0000 1.3 *************** *** 30,38 **** */ #define MAXSHM_RADIO 24 ! #define MAXSHM_IF 5 ! #define MAXSHM_TC_CLASS 6 ! #define MAXSHM_TC_FILTER 20 ! #define MAXSHM_TC_POL (MAXSHM_TC_CLASS * MAXSHM_TC_FILTER) ! #define MAXSHM_HOST_POL 10 #define MUTEX_LOCK 1 --- 30,38 ---- */ #define MAXSHM_RADIO 24 ! #define MAXSHM_IF 6 ! #define MAXSHM_TC_CLASS 64 ! #define MAXSHM_TC_FILTER 64 ! #define MAXSHM_TC_POL 1024 ! #define MAXSHM_HOST_POL 1024 #define MUTEX_LOCK 1 |
From: 똥꼬 <lin...@us...> - 2006-02-09 17:54:13
|
Update of /cvsroot/netadm/gwc/gwclib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23849/gwclib Modified Files: confproc.c Log Message: FIX: fix deleting error. redefine object size of QoS, flow control policy. etc Index: confproc.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwclib/confproc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** confproc.c 30 Jan 2006 17:41:28 -0000 1.1.1.1 --- confproc.c 9 Feb 2006 17:54:06 -0000 1.2 *************** *** 2243,2247 **** if (fr->ret != RET_OK) return; ! #if 1 /* 2005. 11. 30 AM: 2, i can't understand why i define the code as #if 0 11. 12 */ /* remove from module */ --- 2243,2247 ---- if (fr->ret != RET_OK) return; ! #if 1 /* 2005. 11. 30 AM: 2, i can't understand why i define the code as #if 0 11. 12 */ /* remove from module */ |
From: 똥꼬 <lin...@us...> - 2006-02-07 18:04:22
|
Update of /cvsroot/netadm/gwc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24813 Added Files: INSTALL Log Message: Initial check-in --- NEW FILE: INSTALL --- # # # Title : INSTALL # Author : Jeho-Park <ne...@ke...> # Created date : 2006. 02. 08. (wen) 02:21:58 KST # Description : The manual for installation. # #ident "@(#) $Header: /cvsroot/netadm/gwc/INSTALL,v 1.1 2006/02/07 18:04:03 linuxpark Exp $" Contents ========= 1. Compilation. 2. Installation. 3. Start gwc. 4. Uninstallation. 1. Compilation. ---------------- $make 2. Installation. ----------------- Before installation of gwc, you are needed to check your network environment. and then verify which this the case your network it is below. case 1 ) Have remote machine to monitoring and linux gateway to use firewall or network control system. external internet +--------+ linux gateway +-------+ intranet + | +---------------+ remote machine In this case, the installation process is like below $su #make #make install #Select where the target system exiest This target system means the remote machine to monitor so just select "1. Remote" #Select whether the target system is wireless AP or IPv4 router select the type of remote machine If the type of your remote machine is just IPv4 supporting router, select "0. IPv4 support router". or If the type of the remote machine is wireless AP but is not CISCCO's, select "1. 802.11 support wireless AP but not CISCO's" #Please enter IP address of target system The target system means the remote machine to monitor. so enter the IP address of this system. #Select whether target system support SNMP query using SNMPv1.0 If the target system or remote machine is SNMP enabled, select "1. yes" else select "0. no" note ) If you select "1. yes" but the target or remote machine is not SNMP supporting or it can't support SNMPv1.0, you will meet some problems whenever you start gwc. case 2 ) Both target system which also called "remote machine" and gateway are same host. external internet +--------+ linux gateway +-------+ intranet In this case the installation is almost same as above. the only difference is the first question in installation process. #Select where the target system exiest just select "0. This local system". 3. Start gwc. ------------- #gwc start ... #gwc stop 4. Uninstallation. ------------------- change directory to the main source directory. and then execute like below. #make uninstall |