Changeset 1360
- Timestamp:
- 12/19/05 02:30:25 (6 years ago)
- Files:
-
- trunk/net80211/ieee80211_linux.c (modified) (2 diffs)
- trunk/net80211/ieee80211_monitor.c (modified) (2 diffs)
- trunk/net80211/ieee80211_var.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/net80211/ieee80211_linux.c
r1332 r1360 493 493 return ret; 494 494 } 495 static int 496 IEEE80211_SYSCTL_DECL(ieee80211_sysctl_monitor_nods_only, ctl, write, filp, buffer, 497 lenp, ppos) 498 { 499 struct ieee80211vap *vap = ctl->extra1; 500 u_int val; 501 int ret; 502 503 ctl->data = &val; 504 ctl->maxlen = sizeof(val); 505 if (write) { 506 ret = IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, 507 lenp, ppos); 508 if (ret == 0) { 509 vap->iv_monitor_nods_only = val; 510 } 511 } else { 512 val = vap->iv_monitor_nods_only; 513 ret = IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, 514 lenp, ppos); 515 } 516 return ret; 517 } 518 static int 519 IEEE80211_SYSCTL_DECL(ieee80211_sysctl_monitor_txf_len, ctl, write, filp, buffer, 520 lenp, ppos) 521 { 522 struct ieee80211vap *vap = ctl->extra1; 523 u_int val; 524 int ret; 525 526 ctl->data = &val; 527 ctl->maxlen = sizeof(val); 528 if (write) { 529 ret = IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, 530 lenp, ppos); 531 if (ret == 0) { 532 vap->iv_monitor_txf_len = val; 533 } 534 } else { 535 val = vap->iv_monitor_txf_len; 536 ret = IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, 537 lenp, ppos); 538 } 539 return ret; 540 } 495 541 496 542 #define CTL_AUTO -2 /* cannot be CTL_ANY or CTL_NONE */ … … 508 554 .mode = 0644, 509 555 .proc_handler = ieee80211_sysctl_dev_type 556 }, 557 { .ctl_name = CTL_AUTO, 558 .procname = "monitor_nods_only", 559 .mode = 0644, 560 .proc_handler = ieee80211_sysctl_monitor_nods_only 561 }, 562 { .ctl_name = CTL_AUTO, 563 .procname = "monitor_txf_len", 564 .mode = 0644, 565 .proc_handler = ieee80211_sysctl_monitor_txf_len 510 566 }, 511 567 /* NB: must be last entry before NULL */ trunk/net80211/ieee80211_monitor.c
r1315 r1360 187 187 struct sk_buff *skb1; 188 188 struct net_device *dev = vap->iv_dev; 189 struct ieee80211_frame *wh; 190 u_int8_t dir; 189 191 next = TAILQ_NEXT(vap, iv_next); 190 192 if (vap->iv_opmode != IEEE80211_M_MONITOR || … … 196 198 /* XXX stat+msg */ 197 199 continue; 198 } 199 200 } 201 if (vap->iv_monitor_txf_len && tx) { 202 /* truncate transmit feedback packets */ 203 skb_trim(skb1, vap->iv_monitor_txf_len); 204 } 205 wh = (struct ieee80211_frame *)skb->data; 206 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; 207 if (vap->iv_monitor_nods_only && dir != IEEE80211_FC1_DIR_NODS) { 208 /* don't rx fromds, tods, or dstods packets */ 209 continue; 210 } 200 211 switch (vap->iv_dev->type) { 201 212 case ARPHRD_IEEE80211: trunk/net80211/ieee80211_var.h
r1293 r1360 284 284 u_int32_t iv_debug; /* debug msg flags */ 285 285 struct ieee80211_stats iv_stats; /* statistics */ 286 287 int iv_monitor_nods_only; /* in monitor mode only nods traffic */ 288 int iv_monitor_txf_len; /* in monitor mode, truncate tx packets */ 286 289 287 290 int (*iv_newstate)(struct ieee80211vap *,
