Info

struct tcphdr {

_be16 source;

_be16 dest;

_be32 seq;

_be32 ack_seq;

#if defined(_LITTLE_ENDIAN_BITFIELD)

_u16 res1:4, doff:4, fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1;

#elif defined(_BIG_ENDIAN_BITFIELD)

_u16 doff:4, res1:4, cwr:1, ece:1, urg:1, ack:1, psh:1, rst:1, syn:1, fin:1;

#else

#error "Adjust your <asm/byteorder.h> defines"

#endif

Continue reading here: Receiving TCP Data

Was this article helpful?

0 0