hello,
i am getting this kind of error, though i declared my header file like this. so what i did mistake here.........
PHP Code:
error: ‘struct tcphdr’ has no member named ‘th_flags’
error: ‘struct tcphdr’ has no member named ‘th_flags’
error: ‘struct tcphdr’ has no member named ‘th_sport’
error: ‘struct tcphdr’ has no member named ‘th_dport’
error: ‘struct tcphdr’ has no member named ‘th_win’
error: ‘struct tcphdr’ has no member named ‘th_dport’
error: ‘struct tcphdr’ has no member named ‘th_sport’
error: ‘struct tcphdr’ has no member named ‘th_dport’
error: ‘struct tcphdr’ has no member named ‘th_seq’
error: ‘TCP_H’ undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: for each function it appears in.)
error: ‘IP_H’ undeclared (first use in this function)
error: ‘struct tcphdr’ has no member named ‘th_seq’
error: ‘struct
This is the header file....
Code:
#include <libnet.h>
#include <syslog.h>
#include <errno.h>
#define __FAVOR_BSD
#include <netinet/tcp.h>
Code:
if((pkt.tcp.th_flags&TH_SYN)&&(!(pkt.tcp.th_flags&TH_ACK))) {
/* Normal logging of SYN&!ACK packets... */
src_addr.s_addr=0;
src_addr.s_addr=pkt.ip.saddr;
syslog(LOG_INFO, "TCP connection attempt from %s:%d to port %d.", inet_ntoa(src_addr), ntohs(pkt.tcp.th_sport), ntohs(pkt.tcp.th