Update of /cvsroot/netadm/gwc/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15777/include
Modified Files:
sysdef.h
Log Message:
ADD:
[ step2. start to gwc-v1.0-pre3 ]
finished up defining each object of "flow control" in sysdef.h
fc_net_t, fc_svc_t, fc_flow_t, fc_pol_t and some enum types.
Index: sysdef.h
===================================================================
RCS file: /cvsroot/netadm/gwc/include/sysdef.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sysdef.h 25 Feb 2006 22:59:00 -0000 1.2
--- sysdef.h 25 Feb 2006 23:41:14 -0000 1.3
***************
*** 46,49 ****
--- 46,65 ----
typedef enum {
+ SYS_ICMP_UNREACH = 0x0001,
+ SYS_ICMP_ECHO = 0x0002,
+ SYS_ICMP_ECHOREP = 0x0004,
+ SYS_ICMP_SQUENCH = 0x0008,
+ SYS_ICMP_REDIR = 0x0010,
+ SYS_ICMP_TIMEX = 0x0020,
+ SYS_ICMP_PARAMPROB = 0x0040,
+ SYS_ICMP_TIMEST = 0x0080,
+ SYS_ICMP_TIMESTREP = 0x0100,
+ SYS_ICMP_INFOREQ = 0x0200,
+ SYS_ICMP_INFOREP = 0x0400,
+ SYS_ICMP_MASKREQ = 0x0800,
+ SYS_ICMP_MASKREP = 0x1000,
+ } sys_icmp_type_e;
+
+ typedef enum {
SYS_PROTO_TCP = IPPROTO_TCP,
SYS_PROTO_UDP = IPPROTO_UDP,
***************
*** 90,94 ****
} sys_802dot11if_t;
! /* QoS object start */
typedef struct {
char if_name[OL];
--- 106,110 ----
} sys_802dot11if_t;
! /* Q O S O B J E C T start */
typedef struct {
char if_name[OL];
***************
*** 182,194 ****
char mark_name[OL / 4];
} qos_pol_t;
! /* QoS object start */
!
! /* F L O W C O N T R O L start */
typedef struct {
! char name[OL];
! sys_net_type_e type;
! sys_net_t net;
! char net_if[OL];
} fc_net_t;
--- 198,209 ----
char mark_name[OL / 4];
} qos_pol_t;
+ /* Q O S O B J E C T end */
! /* F L O W C O N T R O L O B J E C T start */
typedef struct {
! char name[OL];
! sys_net_type_e type;
! sys_net_t net;
! char net_if[OL]; /* reserved */
} fc_net_t;
***************
*** 199,232 ****
unsigned short port;
unsigned short icmptype;
! } ext;
} fc_svc_t;
typedef struct {
! char name[OL];
! int value;
! sys_thput_unit_e unit;
} fc_flow_t;
/* sys_host_pol_t/flag */
#define BLOCK_HOST 0x0001
#define MODIFY_SEQ 0x0002
#define MAX_PKTRATE 65535
-
typedef struct {
! /* struct in_addr ip; */
char name[OL];
- char src_net[OL];
- char src_svc[OL];
int ip;
unsigned short flag;
int max_pktrate;
- } sys_fc_pol_t;
- typedef struct {
- /* struct in_addr ip; */
- char name[OL];
- int ip;
- unsigned short flag;
- int max_pktrate;
} sys_host_pol_t;
--- 214,254 ----
unsigned short port;
unsigned short icmptype;
! } u;
} fc_svc_t;
typedef struct {
! char name[OL];
! int val;
! sys_thput_unit_e unit;
} fc_flow_t;
+ typedef enum {
+ FC_PR_CONTROL = 1, /* flow control */
+ FC_PR_MOD_HEADER = 2, /* modify packet header */
+ } fc_pol_rule_e;
+
+ typedef struct {
+ char name[OL];
+ unsigned short enable;
+ char snet[OL];
+ char ssvc[OL];
+ char dnet[OL];
+ char dsvc[OL];
+ char flow[OL];
+ fc_pol_rule_e rule;
+ } fc_pol_t;
+ /* F L O W C O N T R O L O B J E C T end */
+ /* TODO: delete soon after completing flow control */
/* sys_host_pol_t/flag */
#define BLOCK_HOST 0x0001
#define MODIFY_SEQ 0x0002
#define MAX_PKTRATE 65535
typedef struct {
! /* struct in_addr ip; */
char name[OL];
int ip;
unsigned short flag;
int max_pktrate;
} sys_host_pol_t;
|