/usr/include/netinet/tcp.h 중





음?ㅠ 보통 struct tcphdr *tcphdr; 이렇게 선언한후에 사용하잖아요 그러면 .... 두개의 구조체가 모두 선언된건가???


#include<stdio.h>

#include<netinet/tcp.h>


int main()

{

        struct tcphdr *tcphdr;

        printf("tcphdr tp_port : %d\n",tcphdr->th_dport);

        printf("tcphdr source : %d\n",tcphdr->source);

        return 0;

}


두번째구조체에있는 tcphdr->source는 인식하지만 첫번째 멤버는 없다고 나온다.

????????

'NetWork' 카테고리의 다른 글

RTP (Realtime Transport Protocol)  (0) 2013.03.04
VMware network  (0) 2012.07.10
ARP_Spoofing  (2) 2012.07.06
ICMP Protocol  (0) 2012.07.06
TCP / IP 프로토콜 스택  (0) 2012.04.25

+ Recent posts