mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
added a flag field to QUERY_PEER (#835)
This commit is contained in:
parent
2d34545304
commit
ebb357245a
|
@ -421,6 +421,7 @@ typedef struct n2n_PEER_INFO {
|
||||||
|
|
||||||
|
|
||||||
typedef struct n2n_QUERY_PEER {
|
typedef struct n2n_QUERY_PEER {
|
||||||
|
uint16_t aflags;
|
||||||
n2n_mac_t srcMac;
|
n2n_mac_t srcMac;
|
||||||
n2n_sock_t sock;
|
n2n_sock_t sock;
|
||||||
n2n_mac_t targetMac;
|
n2n_mac_t targetMac;
|
||||||
|
|
|
@ -1148,7 +1148,7 @@ void send_query_peer (n2n_edge_t * eee,
|
||||||
uint8_t pktbuf[N2N_PKT_BUF_SIZE];
|
uint8_t pktbuf[N2N_PKT_BUF_SIZE];
|
||||||
size_t idx;
|
size_t idx;
|
||||||
n2n_common_t cmn = {0};
|
n2n_common_t cmn = {0};
|
||||||
n2n_QUERY_PEER_t query = {{0}};
|
n2n_QUERY_PEER_t query = {0};
|
||||||
struct peer_info *peer, *tmp;
|
struct peer_info *peer, *tmp;
|
||||||
int n_o_pings = 0;
|
int n_o_pings = 0;
|
||||||
int n_o_top_sn = 0;
|
int n_o_top_sn = 0;
|
||||||
|
|
|
@ -705,6 +705,7 @@ int encode_QUERY_PEER (uint8_t * base,
|
||||||
retval += encode_common(base, idx, common);
|
retval += encode_common(base, idx, common);
|
||||||
retval += encode_mac(base, idx, pkt->srcMac);
|
retval += encode_mac(base, idx, pkt->srcMac);
|
||||||
retval += encode_mac(base, idx, pkt->targetMac);
|
retval += encode_mac(base, idx, pkt->targetMac);
|
||||||
|
retval += encode_uint16(base, idx, pkt->aflags);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -720,6 +721,7 @@ int decode_QUERY_PEER (n2n_QUERY_PEER_t * pkt,
|
||||||
|
|
||||||
retval += decode_mac(pkt->srcMac, base, rem, idx);
|
retval += decode_mac(pkt->srcMac, base, rem, idx);
|
||||||
retval += decode_mac(pkt->targetMac, base, rem, idx);
|
retval += decode_mac(pkt->targetMac, base, rem, idx);
|
||||||
|
retval += decode_uint16(&(pkt->aflags), base, rem, idx);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user