[Netadm-devel] gwc/gwclib confproc.c,1.3,1.4 conftab.c,1.1.1.1,1.2
Status: Beta
Brought to you by:
linuxpark
From: linuxpark <lin...@us...> - 2006-02-25 22:59:12
|
Update of /cvsroot/netadm/gwc/gwclib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22273/gwclib Modified Files: confproc.c conftab.c Log Message: MOD: [ start to gwc-v1.0-pre3, not completed ] ADD: 1. command index, handler (but not main routine, just null), message for gwc-v1.0-pre3 functionalities. sysipc.h, message.h, confproc.h confproc.c, conftab.c 2. data structure for gwc-v1.0-pre3. for example, service protocol object, network object, flow object, policy object in sysdef.h but i didn't insert these object in shared memory (sysshm.h) MOD: 1. version info in global.h 2. renamed current qos concerned data structure from _tc_ to _qos_ else ADD and MOD Index: conftab.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwclib/conftab.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** conftab.c 30 Jan 2006 17:41:28 -0000 1.1.1.1 --- conftab.c 25 Feb 2006 22:59:00 -0000 1.2 *************** *** 45,140 **** */ sys_cmd_t cmdtab[] = { ! {CMD_LIST_APINFO, "list_apinfo", PR(list_apinfo), INFO_CLI_LISTAPINFO} ! , ! {CMD_ADD_APINFO, "add_apinfo", PR(add_apinfo), INFO_CLI_ADDAPINFO} ! , ! {CMD_LIST_SNMPCOMM, "list_snmpcomm", PR(list_snmpcomm), ! INFO_CLI_LISTSNMPCOMM} ! , ! {CMD_ADD_SNMPCOMM, "add_snmpcomm", PR(add_snmpcomm), ! INFO_CLI_ADDSNMPCOMM} ! , ! {CMD_LIST_PHYMACSPEC, "list_phymacspec", PR(list_phymacspec), ! INFO_CLI_LISTPHYMACSPEC} ! , ! {CMD_LIST_SYSINFO, "list_sysinfo", PR(list_sysinfo), ! INFO_CLI_LISTSYSINFO} ! , ! {CMD_LIST_IFINFO, "list_ifinfo", PR(list_ifinfo), INFO_CLI_LISTIFINFO} ! , ! {CMD_LIST_IPINFO, "list_ipinfo", PR(list_ipinfo), INFO_CLI_LISTIPINFO} ! , ! {CMD_LIST_TCPINFO, "list_tcpinfo", PR(list_tcpinfo), ! INFO_CLI_LISTTCPINFO} ! , ! {CMD_LIST_UDPINFO, "list_udpinfo", PR(list_udpinfo), ! INFO_CLI_LISTUDPINFO} ! , ! {CMD_LIST_CCKTPW, "list_ccktpower", PR(list_ccktpower), ! INFO_CLI_LISTCCKTPOWER} ! , ! {CMD_LIST_OFDMTPW, "list_ofdmtpower", PR(list_ofdmtpower), ! INFO_CLI_LISTOFDMTPOWER} ! , ! {CMD_LIST_CLIENTPW, "list_clientpower", PR(list_clientpower), ! INFO_CLI_LISTCLIENTPOWER} ! , ! {CMD_SET_TXPW, "set_txpower", PR(set_txpower), INFO_CLI_SETTXPOWER} ! , ! {CMD_LIST_IF, "list_if", PR(list_if), INFO_CLI_LIST_IF} ! , ! ! {CMD_LIST_TC_MAXBW, "list_tc_maxbw", PR(list_tc_maxbw), ! INFO_CLI_LIST_TC_MAXBW} ! , ! {CMD_ADD_TC_MAXBW, "add_tc_maxbw", PR(add_tc_maxbw), ! INFO_CLI_ADD_TC_MAXBW} ! , ! {CMD_DEL_TC_MAXBW, "del_tc_maxbw", PR(del_tc_maxbw), ! INFO_CLI_DEL_TC_MAXBW} ! , ! {CMD_LIST_TC_CLASS, "list_tc_class", PR(list_tc_class), ! INFO_CLI_LIST_TC_CLASS} ! , ! {CMD_ADD_TC_CLASS, "add_tc_class", PR(add_tc_class), ! INFO_CLI_ADD_TC_CLASS} ! , ! {CMD_DEL_TC_CLASS, "del_tc_class", PR(del_tc_class), ! INFO_CLI_DEL_TC_CLASS} ! , ! {CMD_LIST_TC_FILTER, "list_tc_filter", PR(list_tc_filter), ! INFO_CLI_LIST_TC_FILTER} ! , ! {CMD_ADD_TC_FILTER, "add_tc_filter", PR(add_tc_filter), ! INFO_CLI_ADD_TC_FILTER} ! , ! {CMD_DEL_TC_FILTER, "del_tc_filter", PR(del_tc_filter), ! INFO_CLI_DEL_TC_FILTER} ! , ! {CMD_LIST_TC_POL, "list_tc_pol", PR(list_tc_pol), INFO_CLI_LIST_TC_POL} ! , ! {CMD_ADD_TC_POL, "add_tc_pol", PR(add_tc_pol), INFO_CLI_ADD_TC_POL} ! , ! {CMD_DEL_TC_POL, "del_tc_pol", PR(del_tc_pol), INFO_CLI_DEL_TC_POL} ! , ! {CMD_TC_APPLY, "tc_apply", PR(tc_apply), INFO_CLI_TC_APPLY} ! , ! {CMD_LIST_HOSTPOL, "list_hostpol", PR(list_hostpol), ! INFO_CLI_LIST_HOSTPOL} ! , ! {CMD_ADD_HOSTPOL, "add_hostpol", PR(add_hostpol), INFO_CLI_ADD_HOSTPOL} ! , ! {CMD_DEL_HOSTPOL, "del_hostpol", PR(del_hostpol), INFO_CLI_DEL_HOSTPOL} ! , ! {CMD_HOSTPOL_APPLY, "hostpol_apply", PR(hostpol_apply), ! INFO_CLI_HOSTPOL_APPLY} ! , ! {CMD_LIST_AUTO, "list_auto", PR(list_auto), INFO_CLI_LIST_AUTO} ! , ! {CMD_SET_AUTO, "set_auto", PR(set_auto), INFO_CLI_SET_AUTO} ! , ! {CMD_AUTO_APPLY, "auto_apply", PR(auto_apply), INFO_CLI_AUTO_APPLY} ! , {0} , --- 45,94 ---- */ sys_cmd_t cmdtab[] = { ! {CMD_LIST_APINFO, "list_apinfo", PR(list_apinfo), INFO_CLI_LISTAPINFO}, ! {CMD_ADD_APINFO, "add_apinfo", PR(add_apinfo), INFO_CLI_ADDAPINFO}, ! {CMD_LIST_SNMPCOMM, "list_snmpcomm", PR(list_snmpcomm), INFO_CLI_LISTSNMPCOMM}, ! {CMD_ADD_SNMPCOMM, "add_snmpcomm", PR(add_snmpcomm), INFO_CLI_ADDSNMPCOMM}, ! {CMD_LIST_PHYMACSPEC, "list_phymacspec", PR(list_phymacspec), INFO_CLI_LISTPHYMACSPEC}, ! {CMD_LIST_SYSINFO, "list_sysinfo", PR(list_sysinfo), INFO_CLI_LISTSYSINFO}, ! {CMD_LIST_IFINFO, "list_ifinfo", PR(list_ifinfo), INFO_CLI_LISTIFINFO}, ! {CMD_LIST_IPINFO, "list_ipinfo", PR(list_ipinfo), INFO_CLI_LISTIPINFO}, ! {CMD_LIST_TCPINFO, "list_tcpinfo", PR(list_tcpinfo), INFO_CLI_LISTTCPINFO}, ! {CMD_LIST_UDPINFO, "list_udpinfo", PR(list_udpinfo), INFO_CLI_LISTUDPINFO}, ! {CMD_LIST_CCKTPW, "list_ccktpower", PR(list_ccktpower), INFO_CLI_LISTCCKTPOWER}, ! {CMD_LIST_OFDMTPW, "list_ofdmtpower", PR(list_ofdmtpower), INFO_CLI_LISTOFDMTPOWER}, ! {CMD_LIST_CLIENTPW, "list_clientpower", PR(list_clientpower), INFO_CLI_LISTCLIENTPOWER}, ! {CMD_SET_TXPW, "set_txpower", PR(set_txpower), INFO_CLI_SETTXPOWER}, ! {CMD_LIST_IF, "list_if", PR(list_if), INFO_CLI_LIST_IF}, ! {CMD_LIST_QOS_MAXBW, "list_qos_maxbw", PR(list_qos_maxbw), INFO_CLI_LIST_QOS_MAXBW}, ! {CMD_ADD_QOS_MAXBW, "add_qos_maxbw", PR(add_qos_maxbw), INFO_CLI_ADD_QOS_MAXBW}, ! {CMD_DEL_QOS_MAXBW, "del_qos_maxbw", PR(del_qos_maxbw), INFO_CLI_DEL_QOS_MAXBW}, ! {CMD_LIST_QOS_CLASS, "list_qos_class", PR(list_qos_class), INFO_CLI_LIST_QOS_CLASS}, ! {CMD_ADD_QOS_CLASS, "add_qos_class", PR(add_qos_class), INFO_CLI_ADD_QOS_CLASS}, ! {CMD_DEL_QOS_CLASS, "del_qos_class", PR(del_qos_class), INFO_CLI_DEL_QOS_CLASS}, ! {CMD_LIST_QOS_FILTER, "list_qos_filter", PR(list_qos_filter), INFO_CLI_LIST_QOS_FILTER}, ! {CMD_ADD_QOS_FILTER, "add_qos_filter", PR(add_qos_filter), INFO_CLI_ADD_QOS_FILTER}, ! {CMD_DEL_QOS_FILTER, "del_qos_filter", PR(del_qos_filter), INFO_CLI_DEL_QOS_FILTER}, ! {CMD_LIST_QOS_POL, "list_qos_pol", PR(list_qos_pol), INFO_CLI_LIST_QOS_POL}, ! {CMD_ADD_QOS_POL, "add_qos_pol", PR(add_qos_pol), INFO_CLI_ADD_QOS_POL}, ! {CMD_DEL_QOS_POL, "del_qos_pol", PR(del_qos_pol), INFO_CLI_DEL_QOS_POL}, ! {CMD_QOS_APPLY, "qos_apply", PR(qos_apply), INFO_CLI_QOS_APPLY}, ! ! {CMD_LIST_FC_SVC, "list_fc_svc", PR(list_fc_svc), INFO_CLI_LIST_FC_SVC}, ! {CMD_ADD_FC_SVC, "add_fc_svc", PR(add_fc_svc), INFO_CLI_ADD_FC_SVC}, ! {CMD_DEL_FC_SVC, "del_fc_svc", PR(del_fc_svc), INFO_CLI_DEL_FC_SVC}, ! {CMD_LIST_FC_NET, "list_fc_net", PR(list_fc_net), INFO_CLI_LIST_FC_NET}, ! {CMD_ADD_FC_NET, "add_fc_net", PR(add_fc_net), INFO_CLI_ADD_FC_NET}, ! {CMD_DEL_FC_NET, "del_fc_net", PR(del_fc_net), INFO_CLI_DEL_FC_NET}, ! {CMD_LIST_FC_FLOW, "list_fc_flow", PR(list_fc_flow), INFO_CLI_LIST_FC_FLOW}, ! {CMD_ADD_FC_FLOW, "add_fc_flow", PR(add_fc_flow), INFO_CLI_ADD_FC_FLOW}, ! {CMD_DEL_FC_FLOW, "del_fc_flow", PR(del_fc_flow), INFO_CLI_DEL_FC_FLOW}, ! {CMD_LIST_FC_POL, "list_fc_pol", PR(list_fc_pol), INFO_CLI_LIST_FC_POL}, ! {CMD_ADD_FC_POL, "add_fc_pol", PR(add_fc_pol), INFO_CLI_ADD_FC_POL}, ! {CMD_DEL_FC_POL, "del_fc_pol", PR(del_fc_pol), INFO_CLI_DEL_FC_POL}, ! {CMD_FC_APPLY, "fc_apply", PR(fc_apply), INFO_CLI_FC_APPLY}, ! {CMD_LIST_AUTO, "list_auto", PR(list_auto), INFO_CLI_LIST_AUTO}, ! {CMD_SET_AUTO, "set_auto", PR(set_auto), INFO_CLI_SET_AUTO}, ! {CMD_AUTO_APPLY, "auto_apply", PR(auto_apply), INFO_CLI_AUTO_APPLY}, {0} , Index: confproc.c =================================================================== RCS file: /cvsroot/netadm/gwc/gwclib/confproc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** confproc.c 17 Feb 2006 06:58:59 -0000 1.3 --- confproc.c 25 Feb 2006 22:59:00 -0000 1.4 *************** *** 63,67 **** * this tostab is used in both filter tos and pol mark */ ! sys_tc_tos_t tostab[] = { {APC_TOS_TYPE_MD, "MD", "Minimize-Delay"} , --- 63,67 ---- * this tostab is used in both filter tos and pol mark */ ! qos_tos_t tostab[] = { {APC_TOS_TYPE_MD, "MD", "Minimize-Delay"} , *************** *** 809,813 **** void ! list_tc_maxbw(int argc, char *argv[], int modify, frp_t fr) { int len; --- 809,813 ---- void ! list_qos_maxbw(int argc, char *argv[], int modify, frp_t fr) { int len; *************** *** 866,873 **** void ! add_tc_maxbw(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_dev_t apctcdev; ! sys_tc_dev_t *tcdev; int slot = -1; int i; --- 866,873 ---- void ! add_qos_maxbw(int argc, char *argv[], int modify, frp_t fr) { ! qos_dev_t apctcdev; ! qos_dev_t *tcdev; int slot = -1; int i; *************** *** 883,887 **** return; } ! memset(tcdev, 0, sizeof (sys_tc_dev_t)); if (!str_nospace(argv[0])) --- 883,887 ---- return; } ! memset(tcdev, 0, sizeof (qos_dev_t)); if (!str_nospace(argv[0])) *************** *** 947,953 **** if (slot < csm->tcifcnt) { memmove(&csm->tc_dev[slot + 1], &csm->tc_dev[slot], ! sizeof (sys_tc_dev_t) * (csm->tcifcnt - slot)); } ! memcpy(&csm->tc_dev[slot], tcdev, sizeof (sys_tc_dev_t)); csm->tcifcnt++; --- 947,953 ---- if (slot < csm->tcifcnt) { memmove(&csm->tc_dev[slot + 1], &csm->tc_dev[slot], ! sizeof (qos_dev_t) * (csm->tcifcnt - slot)); } ! memcpy(&csm->tc_dev[slot], tcdev, sizeof (qos_dev_t)); csm->tcifcnt++; *************** *** 965,971 **** void ! del_tc_maxbw(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_dev_t *tcdev = NULL; int i; int slot; --- 965,971 ---- void ! del_qos_maxbw(int argc, char *argv[], int modify, frp_t fr) { ! qos_dev_t *tcdev = NULL; int i; int slot; *************** *** 1008,1016 **** if (slot < (csm->tcifcnt - 1)) { memcpy(&csm->tc_dev[slot], &csm->tc_dev[slot + 1], ! sizeof (sys_tc_dev_t) * (csm->tcifcnt - slot - 1)); } memset(&csm->tc_dev[csm->tcifcnt - 1], 0, ! sizeof (sys_tc_dev_t)); csm->tcifcnt--; --- 1008,1016 ---- if (slot < (csm->tcifcnt - 1)) { memcpy(&csm->tc_dev[slot], &csm->tc_dev[slot + 1], ! sizeof (qos_dev_t) * (csm->tcifcnt - slot - 1)); } memset(&csm->tc_dev[csm->tcifcnt - 1], 0, ! sizeof (qos_dev_t)); csm->tcifcnt--; *************** *** 1026,1030 **** void ! list_tc_class(int argc, char *argv[], int modify, frp_t fr) { int len; --- 1026,1030 ---- void ! list_qos_class(int argc, char *argv[], int modify, frp_t fr) { int len; *************** *** 1075,1082 **** void ! add_tc_class(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_class_t apcclass; ! sys_tc_class_t *class; int slot = -1; int i; --- 1075,1082 ---- void ! add_qos_class(int argc, char *argv[], int modify, frp_t fr) { ! qos_class_t apcclass; ! qos_class_t *class; int slot = -1; int i; *************** *** 1084,1096 **** if (argc == 3) { ! if (csm->cscnt < MAXSHM_TC_CLASS) { class = &apcclass; } else { frerr(fr, RET_EINTERNAL, "Class buffer full, Max Class is limited to %d\n", ! MAXSHM_TC_CLASS); return; } ! memset(class, 0, sizeof (sys_tc_class_t)); if (!str_nospace(argv[0])) --- 1084,1096 ---- if (argc == 3) { ! if (csm->cscnt < MAXSHM_QOS_CLASS) { class = &apcclass; } else { frerr(fr, RET_EINTERNAL, "Class buffer full, Max Class is limited to %d\n", ! MAXSHM_QOS_CLASS); return; } ! memset(class, 0, sizeof (qos_class_t)); if (!str_nospace(argv[0])) *************** *** 1163,1169 **** if (slot < csm->cscnt) { memmove(&csm->glass[slot + 1], &csm->glass[slot], ! sizeof (sys_tc_class_t) * (csm->cscnt - slot)); } ! memcpy(&csm->glass[slot], class, sizeof (sys_tc_class_t)); csm->cscnt++; --- 1163,1169 ---- if (slot < csm->cscnt) { memmove(&csm->glass[slot + 1], &csm->glass[slot], ! sizeof (qos_class_t) * (csm->cscnt - slot)); } ! memcpy(&csm->glass[slot], class, sizeof (qos_class_t)); csm->cscnt++; *************** *** 1181,1187 **** void ! del_tc_class(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_class_t *class = NULL; int i; int slot; --- 1181,1187 ---- void ! del_qos_class(int argc, char *argv[], int modify, frp_t fr) { ! qos_class_t *class = NULL; int i; int slot; *************** *** 1226,1233 **** if (slot < (csm->cscnt - 1)) { memcpy(&csm->glass[slot], &csm->glass[slot + 1], ! sizeof (sys_tc_class_t) * (csm->cscnt - slot - 1)); } ! memset(&csm->glass[csm->cscnt - 1], 0, sizeof (sys_tc_class_t)); csm->cscnt--; --- 1226,1233 ---- if (slot < (csm->cscnt - 1)) { memcpy(&csm->glass[slot], &csm->glass[slot + 1], ! sizeof (qos_class_t) * (csm->cscnt - slot - 1)); } ! memset(&csm->glass[csm->cscnt - 1], 0, sizeof (qos_class_t)); csm->cscnt--; *************** *** 1243,1247 **** void ! list_tc_filter(int argc, char *argv[], int modify, frp_t fr) { int len; --- 1243,1247 ---- void ! list_qos_filter(int argc, char *argv[], int modify, frp_t fr) { int len; *************** *** 1250,1254 **** int i; int n; ! sys_tc_tos_t *ptostab; int found = 0; --- 1250,1254 ---- int i; int n; ! qos_tos_t *ptostab; int found = 0; *************** *** 1310,1317 **** } else if (csm->filter[i].type == APC_FILTER_TYPE_PROTO) { /* filter_name 1 {tcp | udp} port */ ! if (csm->filter[i].u.proto.type == APC_TC_PROTO_TCP) n += 1 + sprintf(&fr->p[n], "TCP"); else if (csm->filter[i].u.proto.type == ! APC_TC_PROTO_UDP) n += 1 + sprintf(&fr->p[n], "UDP"); else { --- 1310,1317 ---- } else if (csm->filter[i].type == APC_FILTER_TYPE_PROTO) { /* filter_name 1 {tcp | udp} port */ ! if (csm->filter[i].u.proto.type == SYS_PROTO_TCP) n += 1 + sprintf(&fr->p[n], "TCP"); else if (csm->filter[i].u.proto.type == ! SYS_PROTO_UDP) n += 1 + sprintf(&fr->p[n], "UDP"); else { *************** *** 1336,1359 **** void ! add_tc_filter(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_filter_t apcfilter; ! sys_tc_filter_t *filter; int slot = -1; int i; ! sys_tc_tos_t *ptostab; int found = 0; if (((atoi(argv[1]) == APC_FILTER_TYPE_TOS) && (argc == 3)) || ((atoi(argv[1]) == APC_FILTER_TYPE_PROTO) && (argc == 4))) { ! if (csm->ftcnt < MAXSHM_TC_FILTER) { filter = &apcfilter; } else { frerr(fr, RET_EINTERNAL, "filter buffer full, Max filter is limited to %d\n", ! MAXSHM_TC_FILTER); return; } ! memset(filter, 0, sizeof (sys_tc_filter_t)); if (!str_nospace(argv[0])) { --- 1336,1359 ---- void ! add_qos_filter(int argc, char *argv[], int modify, frp_t fr) { ! qos_filter_t apcfilter; ! qos_filter_t *filter; int slot = -1; int i; ! qos_tos_t *ptostab; int found = 0; if (((atoi(argv[1]) == APC_FILTER_TYPE_TOS) && (argc == 3)) || ((atoi(argv[1]) == APC_FILTER_TYPE_PROTO) && (argc == 4))) { ! if (csm->ftcnt < MAXSHM_QOS_FILTER) { filter = &apcfilter; } else { frerr(fr, RET_EINTERNAL, "filter buffer full, Max filter is limited to %d\n", ! MAXSHM_QOS_FILTER); return; } ! memset(filter, 0, sizeof (qos_filter_t)); if (!str_nospace(argv[0])) { *************** *** 1419,1423 **** /* APC_FILTER_TYPE_PROTO */ if (!strcasecmp("TCP", argv[2])) { ! filter->u.proto.type = APC_TC_PROTO_TCP; if (!str_isdigit(argv[3])) { --- 1419,1423 ---- /* APC_FILTER_TYPE_PROTO */ if (!strcasecmp("TCP", argv[2])) { ! filter->u.proto.type = SYS_PROTO_TCP; if (!str_isdigit(argv[3])) { *************** *** 1435,1439 **** } else if (!strcasecmp("UDP", argv[2])) { ! filter->u.proto.type = APC_TC_PROTO_UDP; if (!str_isdigit(argv[3])) { --- 1435,1439 ---- } else if (!strcasecmp("UDP", argv[2])) { ! filter->u.proto.type = SYS_PROTO_UDP; if (!str_isdigit(argv[3])) { *************** *** 1471,1477 **** if (slot < csm->ftcnt) { memmove(&csm->filter[slot + 1], &csm->filter[slot], ! sizeof (sys_tc_filter_t) * (csm->ftcnt - slot)); } ! memcpy(&csm->filter[slot], filter, sizeof (sys_tc_filter_t)); csm->ftcnt++; --- 1471,1477 ---- if (slot < csm->ftcnt) { memmove(&csm->filter[slot + 1], &csm->filter[slot], ! sizeof (qos_filter_t) * (csm->ftcnt - slot)); } ! memcpy(&csm->filter[slot], filter, sizeof (qos_filter_t)); csm->ftcnt++; *************** *** 1490,1496 **** void ! del_tc_filter(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_filter_t *filter = NULL; int i; int slot; --- 1490,1496 ---- void ! del_qos_filter(int argc, char *argv[], int modify, frp_t fr) { ! qos_filter_t *filter = NULL; int i; int slot; *************** *** 1525,1533 **** if (slot < (csm->ftcnt - 1)) { memcpy(&csm->filter[slot], &csm->filter[slot + 1], ! sizeof (sys_tc_filter_t) * (csm->ftcnt - slot - 1)); } memset(&csm->filter[csm->ftcnt - 1], 0, ! sizeof (sys_tc_filter_t)); csm->ftcnt--; --- 1525,1533 ---- if (slot < (csm->ftcnt - 1)) { memcpy(&csm->filter[slot], &csm->filter[slot + 1], ! sizeof (qos_filter_t) * (csm->ftcnt - slot - 1)); } memset(&csm->filter[csm->ftcnt - 1], 0, ! sizeof (qos_filter_t)); csm->ftcnt--; *************** *** 1543,1547 **** void ! list_tc_pol(int argc, char *argv[], int modify, frp_t fr) { int len; --- 1543,1547 ---- void ! list_qos_pol(int argc, char *argv[], int modify, frp_t fr) { int len; *************** *** 1605,1628 **** void ! add_tc_pol(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_pol_t apcpol; ! sys_tc_pol_t *pol; int slot = -1; int i; ! sys_tc_tos_t *ptostab; int found = 0; if (((argc == 4) && (atoi(argv[3]) == NOMARK)) || ((argc == 5) && (atoi(argv[3]) == USEMARK))) { ! if (csm->polcnt < MAXSHM_TC_POL) { pol = &apcpol; } else { frerr(fr, RET_EINTERNAL, "Policy buffer full, Max Policy is limited to %d\n", ! MAXSHM_TC_POL); return; } ! memset(pol, 0, sizeof (sys_tc_pol_t)); /* policy_name */ --- 1605,1628 ---- void ! add_qos_pol(int argc, char *argv[], int modify, frp_t fr) { ! qos_pol_t apcpol; ! qos_pol_t *pol; int slot = -1; int i; ! qos_tos_t *ptostab; int found = 0; if (((argc == 4) && (atoi(argv[3]) == NOMARK)) || ((argc == 5) && (atoi(argv[3]) == USEMARK))) { ! if (csm->polcnt < MAXSHM_QOS_POL) { pol = &apcpol; } else { frerr(fr, RET_EINTERNAL, "Policy buffer full, Max Policy is limited to %d\n", ! MAXSHM_QOS_POL); return; } ! memset(pol, 0, sizeof (qos_pol_t)); /* policy_name */ *************** *** 1738,1744 **** if (slot < csm->polcnt) { memmove(&csm->pol[slot + 1], &csm->pol[slot], ! sizeof (sys_tc_pol_t) * (csm->polcnt - slot)); } ! memcpy(&csm->pol[slot], pol, sizeof (sys_tc_pol_t)); csm->polcnt++; --- 1738,1744 ---- if (slot < csm->polcnt) { memmove(&csm->pol[slot + 1], &csm->pol[slot], ! sizeof (qos_pol_t) * (csm->polcnt - slot)); } ! memcpy(&csm->pol[slot], pol, sizeof (qos_pol_t)); csm->polcnt++; *************** *** 1757,1763 **** void ! del_tc_pol(int argc, char *argv[], int modify, frp_t fr) { ! sys_tc_pol_t *pol = NULL; int i; int slot; --- 1757,1763 ---- void ! del_qos_pol(int argc, char *argv[], int modify, frp_t fr) { ! qos_pol_t *pol = NULL; int i; int slot; *************** *** 1784,1791 **** if (slot < (csm->polcnt - 1)) { memcpy(&csm->pol[slot], &csm->pol[slot + 1], ! sizeof (sys_tc_pol_t) * (csm->polcnt - slot - 1)); } ! memset(&csm->pol[csm->polcnt - 1], 0, sizeof (sys_tc_pol_t)); csm->polcnt--; --- 1784,1791 ---- if (slot < (csm->polcnt - 1)) { memcpy(&csm->pol[slot], &csm->pol[slot + 1], ! sizeof (qos_pol_t) * (csm->polcnt - slot - 1)); } ! memset(&csm->pol[csm->polcnt - 1], 0, sizeof (qos_pol_t)); csm->polcnt--; *************** *** 1869,1873 **** void ! tc_apply(int argc, char *argv[], int modify, frp_t fr) { #if 0 --- 1869,1873 ---- void ! qos_apply(int argc, char *argv[], int modify, frp_t fr) { #if 0 *************** *** 1880,1884 **** int n; char proto[OL / 4]; /* TCP or UDP */ ! sys_tc_tos_t *ptostab; #ifndef TC_DEBUG int status; --- 1880,1884 ---- int n; char proto[OL / 4]; /* TCP or UDP */ ! qos_tos_t *ptostab; #ifndef TC_DEBUG int status; *************** *** 1974,1978 **** } else { #if 0 ! if (csm->filter[k].u.proto.type == APC_TC_PROTO_TCP) { n += sprintf(cmd + n, " match tcp dst 0x%x 0xffff", --- 1974,1978 ---- } else { #if 0 ! if (csm->filter[k].u.proto.type == SYS_PROTO_TCP) { n += sprintf(cmd + n, " match tcp dst 0x%x 0xffff", *************** *** 1995,1999 **** /* it is now support the PROTOCOL type of filter */ if (csm->pol[i].mark_used == USEMARK) { ! if (csm->filter[k].u.proto.type == APC_TC_PROTO_TCP) { strcpy(proto, "tcp"); } else --- 1995,1999 ---- /* it is now support the PROTOCOL type of filter */ if (csm->pol[i].mark_used == USEMARK) { ! if (csm->filter[k].u.proto.type == SYS_PROTO_TCP) { strcpy(proto, "tcp"); } else *************** *** 2024,2029 **** } void ! list_hostpol(int argc, char *argv[], int modify, frp_t fr) { int len; --- 2024,2065 ---- } + void list_fc_svc(int argc, char *argv[], int modify, frp_t fr) + { + } + + void add_fc_svc(int argc, char *argv[], int modify, frp_t fr) + { + } + + void del_fc_svc(int argc, char *argv[], int modify, frp_t fr) + { + } + + void list_fc_net(int argc, char *argv[], int modify, frp_t fr) + { + } + + void add_fc_net(int argc, char *argv[], int modify, frp_t fr) + { + } + + void del_fc_net(int argc, char *argv[], int modify, frp_t fr) + { + } + + void list_fc_flow(int argc, char *argv[], int modify, frp_t fr) + { + } + + void add_fc_flow(int argc, char *argv[], int modify, frp_t fr) + { + } + + void del_fc_flow(int argc, char *argv[], int modify, frp_t fr) + { + } + void ! list_fc_pol(int argc, char *argv[], int modify, frp_t fr) { int len; *************** *** 2082,2086 **** void ! add_hostpol(int argc, char *argv[], int modify, frp_t fr) { sys_host_pol_t hostpol; --- 2118,2122 ---- void ! add_fc_pol(int argc, char *argv[], int modify, frp_t fr) { sys_host_pol_t hostpol; *************** *** 2213,2217 **** void ! del_hostpol(int argc, char *argv[], int modify, frp_t fr) { sys_host_pol_t *hp = NULL; --- 2249,2253 ---- void ! del_fc_pol(int argc, char *argv[], int modify, frp_t fr) { sys_host_pol_t *hp = NULL; *************** *** 2290,2294 **** void ! hostpol_apply(int argc, char *argv[], int modify, frp_t fr) { kuio_msg_t msg; --- 2326,2330 ---- void ! fc_apply(int argc, char *argv[], int modify, frp_t fr) { kuio_msg_t msg; |