hi,all
readBytes: An NSData object containing the data to filter. For non-UDP/TCP flows, since the data may optionally include the IP header, readBytes includes a 4-byte NEFilterDataAttribute field preceding the user data. Your handler must examine the NEFilterDataAttribute field and handle the data accordingly.
the param above in method handleInboundDataFromFlow:readBytesStartOffset:readBytes:
i assume it contains a 4-byte NEFilterDataAttribute field preceding the user data all the time,
is it normal that i get a NEFilterDataAttribute: 1099782776645(and some other very big number)
const NEFilterDataAttribute* dataAttr = readBytes.bytes;
NSLog(@"NEFilterDataAttribute: %ld",*dataAttr);
and after the initial 4 bytes, if the offset param is 0, can i assume that UDP/TCP or IP packet headers can be extracted from the data?