¡@

Home 

2014/10/16 ¤W¤È 08:25:40

android Programming Glossary: tcphdr

iptables in android

http://stackoverflow.com/questions/4577268/iptables-in-android

checksum long get_tcp_checksum struct iphdr myip struct tcphdr mytcp __u16 total_len ntohs myip tot_len int tcpopt_len mytcp.. IPPROTO_TCP pseudohead.length htons sizeof struct tcphdr tcpopt_len tcpdatalen int totaltcp_len sizeof struct tcp_pseudo.. int totaltcp_len sizeof struct tcp_pseudo sizeof struct tcphdr tcpopt_len tcpdatalen unsigned short tcp new unsigned short..

iptables in android

http://stackoverflow.com/questions/4577268/iptables-in-android

16 bits while sum 16 sum sum 0xffff sum 16 return ~sum tcp checksum long get_tcp_checksum struct iphdr myip struct tcphdr mytcp __u16 total_len ntohs myip tot_len int tcpopt_len mytcp doff 4 20 int tcpdatalen total_len mytcp doff 4 myip ihl 4.. pseudohead.dst_addr myip daddr pseudohead.zero 0 pseudohead.proto IPPROTO_TCP pseudohead.length htons sizeof struct tcphdr tcpopt_len tcpdatalen int totaltcp_len sizeof struct tcp_pseudo sizeof struct tcphdr tcpopt_len tcpdatalen unsigned short.. htons sizeof struct tcphdr tcpopt_len tcpdatalen int totaltcp_len sizeof struct tcp_pseudo sizeof struct tcphdr tcpopt_len tcpdatalen unsigned short tcp new unsigned short totaltcp_len unsigned short tcp malloc totaltcp_len memcpy unsigned..