ieee80211_radiotap_iterator_init()
및
radiotap-parser.c
에서
ieee80211_radiotap_iterator_next()
를 사용하는 몇 가지 코드를 가지고
, 아마도 누군가가 나 교육을 할 수 있습니까? 제한 범위는 그 코드에 나사 무언가를 가지고위한있다
/* where packet is `const u_char *packet' */
struct ieee80211_radiotap_iterator rti;
struct ieee80211_radiotap_header *rth = (struct ieee80211_radiotap_header *) packet;
/* 802.11 frame starts here */
struct wi_frame *fr= (struct wi_frame *) (packet + rth->it_len);
/* Set up the iteration */
int ret = ieee80211_radiotap_iterator_init(&rti, rth, rth->it_len);
/* Loop until we've consumed all the fields */
while(!ret) {
printf("Itteration: %d\n", count++);
ret = ieee80211_radiotap_iterator_next(&rti);
if(ret) {
/*
* The problem is here, I'm dropping into this clause with
* a value of `1` consistently, that doesn't match my platform's
* definition of EINVAL or ENOENT.
*/
continue;
}
switch(rti.this_arg_index) {
default:
printf("Constant: %d\n", *rti.this_arg);
break;
}
}
, 내가, 내가 생각 : 내가 수정없이 더 많거나 적은 the documentation에서 샘플 코드를 사용하고, 내가 달성하기 위해 노력하고 있었는지에 아주 잘 맞는 1
이 ieee80211_radiotap_iterator_next()
에서 반환됨에 혼란스러워서, implenentation에 따라 the implementation의 오류 조건처럼 보이지 않습니다.
"(type mgt) and (not type mgt subtype beacon)"
유형의 패킷을 필터링하고 있으며 데이터 링크가 DLT_IEEE802_11_RADIO
으로 설정된 경우 libpcap에 이러한 속성이 포함되어 있는지 확실하지 않습니다.
감사합니다. 나는'ieee80211_radiotap_iterator_next()'의 사용자 영역 구현 결과를 사용하는 방법을 모르겠습니다. 그러나 나는 파기를 계속할 것이다. 동일한 두 함수의 두 가지 병렬 구현이 있다고 생각조차하지 못했습니다! –