pcap
-
Window 에서 패킷 스니핑 프로그램. (TCP/IP 헤더부 출력)Programming/TCP/IP 2008. 10. 20. 15:57
pcap용 헤더파일과 라이브러리 경로를 추가후 win32 콘솔에서 작성 ///////////////////////// IP_Data.h ///////////////////////// #define ETH_ALEN 6 // 출발및 도착지 주소의 크기 정의 struct MEC_Ether_header { u_int8_t ether_dhost[ETH_ALEN]; // 도착지 이더넷 주소 u_int8_t ether_shost[ETH_ALEN]; // 출발지 이더넷 주소 u_int16_t ether_type; // 패킷 타입 ID 필드 }; #pragma pack(push,1) struct MEC_Ip_header{ unsigned char ip_hl:4; // 헤더 길이 unsigned char ip_v:4; /..