changed wtp_count to index (naming for more general use)

FossilOrigin-Name: cca49e531e801cdeadab8d26e3892db5c9c89c994e2d9cfa6ce91f307e4d07fb
This commit is contained in:
7u83@maiol.ru
2016-11-07 18:37:02 +00:00
parent 5bfc592a68
commit 11bbcab554
6 changed files with 8 additions and 8 deletions

View File

@ -37,7 +37,7 @@ static int acip_cmp(const void *x1, const void *x2)
struct cw_acip *ip1 = (struct cw_acip *) x1;
struct cw_acip *ip2 = (struct cw_acip *) x2;
int r = ip1->wtp_count - ip2->wtp_count;
int r = ip1->index - ip2->index;
if (r!=0)
return r;

View File

@ -5,7 +5,7 @@
struct cw_acip{
struct sockaddr_storage ip;
uint32_t wtp_count;
uint32_t index;
};
typedef struct cw_acip cw_acip_t;

View File

@ -64,7 +64,7 @@ int cw_in_capwap_control_ip_address(struct conn *conn, struct cw_action_in *a,
addr.sin_family=AF_INET;
sock_setport((struct sockaddr*)&addr,CAPWAP_CONTROL_PORT);
memcpy(&acip->ip,&addr,sizeof(addr));
acip->wtp_count = cw_get_word(data+4);
acip->index = cw_get_word(data+4);
}
if (a->elem_id == CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS) {
@ -74,7 +74,7 @@ int cw_in_capwap_control_ip_address(struct conn *conn, struct cw_action_in *a,
addr.sin6_family=AF_INET6;
sock_setport((struct sockaddr*)&addr,CAPWAP_CONTROL_PORT);
memcpy(&acip->ip,&addr,sizeof(addr));
acip->wtp_count = cw_get_word(data+16);
acip->index = cw_get_word(data+16);
}

View File

@ -16,7 +16,7 @@ static int put_ip(uint8_t *dst /*void *priv*/, cw_acip_t * acip /*void *data*/)
uint8_t *d = dst+4;
d+=cw_put_sockaddr(d,&acip->ip);
d+=cw_put_word(d,acip->wtp_count);
d+=cw_put_word(d,acip->index);
int fam = sock_addrfamily(&acip->ip);
int elem_id=-1;