Commit 52a507b2 authored by Stig Venaas's avatar Stig Venaas
Browse files

added IPv6 payload length and next header anon

git-svn-id: file:///home/svn/mapi/trunk@909 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 187d7f8c
......@@ -586,7 +586,7 @@ void anonymize_field(int protocol, int field, int function,mapipacket *packet,st
header_pointer = field_pointer;
len = header_len = packet->ipdsize;
break;
case TOS: {
case TOS: { /* Traffic Class */
/* not on byte boundary, so need to copy value into
* our own variable, and copy result back again */
unsigned char ttl;
......@@ -599,7 +599,7 @@ void anonymize_field(int protocol, int field, int function,mapipacket *packet,st
flow[1] = (flow[1] & 0xf) | (ttl << 4);
return;
}
case FLOW: {
case FLOW: { /* Flow Label */
/* not on byte boundary, so need to copy value into
* our own variable, and copy result back again
* last 20 bits are the flow label */
......@@ -612,7 +612,15 @@ void anonymize_field(int protocol, int field, int function,mapipacket *packet,st
packet->ip6h->ip6_flow = htonl((packet->ip6h->ip6_flow & 0xfff00000) | (flow & 0xfffff));
return;
}
case TTL:
case PACKET_LENGTH: /* Really the Payload Length */
field_pointer = (unsigned char *)&packet->ip6h->ip6_plen;
len=2;
break;
case IP_PROTO: /* Really the Next Header field */
field_pointer = (unsigned char *)&packet->ip6h->ip6_nxt;
len = 1;
break;
case TTL: /* Hop Limit */
field_pointer = (unsigned char *)&packet->ip6h->ip6_hlim;
len = 1;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment