Notice
Recent Posts
Recent Comments
목록pcap 2
LuvSea
pcap 을 이용한 패킷 분석( IP 해더 분석 )
앞장에서 설명한 패킷 캡쳐 순서를 간략하게 요약하면 다음과 같다. - 연결된 장치명을 구해 낸다. char * pcap_lookupdev(char * errbuf); - 장치명을 이용해서 해당 장치의 ID를 획득한다.(장치를 연다.) pcap_t * pcap_open_live(char * device,int snaplen,int promisc,int to_ms, char * ebuf); - 열린 장치로 부터 패킷이 오길 기다리다 패킷이 도착하면 캡쳐한다.(대기 시간및 캡처 방식은 장치를 열대 설정) u_char * pcap_next(pcap_t * p,struct pcap_pkthdr * h) - 이더넷 구조체를 이용해서 이더넷 정보를 읽어 낸다. struct ether_header * header; -..
sTudy
2009. 8. 24. 09:32