1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602
|
/*
This file is part of Kismet
Kismet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Kismet is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Kismet; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// pcapsource is probably the most complex source handing the largest number of
// card types. Ideally, everything should be part of the pcap source except
// wsp100 and drones.
#ifndef __PCAPSOURCE_H__
#define __PCAPSOURCE_H__
#include "config.h"
#ifdef HAVE_LIBPCAP
#include "packet.h"
#include "packetsource.h"
#include "ifcontrol.h"
#include "iwcontrol.h"
extern "C" {
#ifndef HAVE_PCAPPCAP_H
#include <pcap.h>
//#include <net/bpf.h>
#else
#include <pcap/pcap.h>
#include <pcap/net/bpf.h>
#endif
}
// Custom packet stream headers
// Define this for the max length of a ssid, not counting os-trailing null
#define MAX_SSID_LEN 32
// Define this for wlan-ng DLT_PRISM_HEADER support
#define WLAN_DEVNAMELEN_MAX 16
// The BSD datalink that doesn't report a sane value
#define KDLT_BSD802_11 -100
#ifndef DLT_PRISM_HEADER
#define DLT_PRISM_HEADER 119 /* prism header, not defined on some platforms */
#endif
#ifndef DLT_IEEE802_11_RADIO
#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus WLAN header */
#endif
#ifndef DLT_IEEE802_11_RADIO_AVS
#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS header, alternate link type */
#endif
#ifndef DLT_PPI
#define DLT_PPI 192 /* cace PPI */
#endif
// Extension to radiotap header not yet included in all BSD's
#ifndef IEEE80211_RADIOTAP_F_FCS
#define IEEE80211_RADIOTAP_F_FCS 0x10 /* frame includes FCS */
#endif
#ifndef IEEE80211_IOC_CHANNEL
#define IEEE80211_IOC_CHANNEL 0
#endif
// Generic pcapsource
class PcapSource : public KisPacketSource {
public:
PcapSource(string in_name, string in_dev) : KisPacketSource(in_name, in_dev) {
decode_fcs = 0;
crc32_table = NULL;
}
virtual int OpenSource();
virtual int CloseSource();
virtual int FetchDescriptor();
virtual int FetchPacket(kis_packet *packet, uint8_t *data, uint8_t *moddata);
static void Callback(u_char *bp, const struct pcap_pkthdr *header,
const u_char *in_data);
virtual void SetSmartCRC(int in_smart);
protected:
// Prism 802.11 headers from wlan-ng tacked on to the beginning of a
// pcap packet... Snagged from the wlan-ng source
typedef struct {
uint32_t did;
uint16_t status;
uint16_t len;
uint32_t data;
} __attribute__((__packed__)) p80211item_uint32_t;
typedef struct {
uint32_t msgcode;
uint32_t msglen;
uint8_t devname[WLAN_DEVNAMELEN_MAX];
p80211item_uint32_t hosttime;
p80211item_uint32_t mactime;
p80211item_uint32_t channel;
p80211item_uint32_t rssi;
p80211item_uint32_t sq;
p80211item_uint32_t signal;
p80211item_uint32_t noise;
p80211item_uint32_t rate;
p80211item_uint32_t istx;
p80211item_uint32_t frmlen;
} __attribute__((__packed__)) wlan_ng_prism2_header;
// Prism 802.11 headers from the openbsd Hermes drivers, even though they don't return
// a valid linktype yet. Structure lifted from bsd_airtools by dachb0den labs.
typedef struct {
u_int16_t wi_status;
u_int16_t wi_ts0;
u_int16_t wi_ts1;
u_int8_t wi_silence;
u_int8_t wi_signal;
u_int8_t wi_rate;
u_int8_t wi_rx_flow;
u_int16_t wi_rsvd0;
u_int16_t wi_rsvd1;
} bsd_80211_header;
// wlan-ng (and hopefully others) AVS header, version one. Fields in
// network byte order.
typedef struct {
uint32_t version;
uint32_t length;
uint64_t mactime;
uint64_t hosttime;
uint32_t phytype;
uint32_t channel;
uint32_t datarate;
uint32_t antenna;
uint32_t priority;
uint32_t ssi_type;
int32_t ssi_signal;
int32_t ssi_noise;
uint32_t preamble;
uint32_t encoding;
} avs_80211_1_header;
typedef struct {
uint8_t pph_version;
uint8_t pph_flags;
uint16_t pph_len;
uint32_t pph_dlt;
} ppi_packet_header;
#define PPI_PH_FLAG_ALIGNED 2
typedef struct {
uint16_t pfh_datatype;
uint16_t pfh_datalen;
} ppi_field_header;
#define PPI_FIELD_11COMMON 2
#define PPI_FIELD_11NMAC 3
#define PPI_FIELD_11NMACPHY 4
#define PPI_FIELD_SPECMAP 5
#define PPI_FIELD_PROCINFO 6
#define PPI_FIELD_CAPINFO 7
typedef struct {
uint16_t pfh_datatype;
uint16_t pfh_datalen;
uint64_t tsf_timer;
uint16_t flags;
uint16_t rate;
uint16_t freq_mhz;
uint16_t chan_flags;
uint8_t fhss_hopset;
uint8_t fhss_pattern;
int8_t signal_dbm;
int8_t noise_dbm;
} ppi_80211_common;
#define PPI_80211_FLAG_FCS 1
#define PPI_80211_FLAG_TSFMS 2
#define PPI_80211_FLAG_INVALFCS 4
#define PPI_80211_FLAG_PHYERROR 8
#define PPI_80211_CHFLAG_TURBO 16
#define PPI_80211_CHFLAG_CCK 32
#define PPI_80211_CHFLAG_OFDM 64
#define PPI_80211_CHFLAG_2GHZ 128
#define PPI_80211_CHFLAG_5GHZ 256
#define PPI_80211_CHFLAG_PASSIVE 512
#define PPI_80211_CHFLAG_DYNAMICCCK 1024
#define PPI_80211_CHFLAG_GFSK 2048
typedef struct {
uint16_t pfh_datatype;
uint16_t pfh_datalen;
uint32_t flags;
uint32_t a_mpdu_id;
uint8_t num_delimiters;
uint8_t reserved[3];
} ppi_11n_mac;
#define PPI_11NMAC_GREENFIELD 1
#define PPI_11NMAC_HT2040 2
#define PPI_11NMAC_RX_SGI 4
#define PPI_11NMAC_DUPERX 8
#define PPI_11NMAC_AGGREGATE 16
#define PPI_11NMAC_MOREAGGREGATE 32
#define PPI_11NMAC_AGGCRC 64
typedef struct {
uint16_t pfh_datatype;
uint16_t pfh_datalen;
uint32_t flags;
uint32_t a_mpdu_id;
uint8_t num_delimiters;
uint8_t mcs;
uint8_t num_streams;
uint8_t combined_rssi;
uint8_t ant0_ctl_rssi;
uint8_t ant1_ctl_rssi;
uint8_t ant2_ctl_rssi;
uint8_t ant3_ctl_rssi;
uint8_t ant0_ext_rssi;
uint8_t ant1_ext_rssi;
uint8_t ant2_ext_rssi;
uint8_t ant3_ext_rssi;
uint16_t extension_freq_mhz;
uint16_t extension_flags;
int8_t ant0_signal_dbm;
int8_t ant0_noise_dbm;
int8_t ant1_signal_dbm;
int8_t ant1_noise_dbm;
int8_t ant2_signal_dbm;
int8_t ant2_noise_dbm;
int8_t ant3_signal_dbm;
int8_t ant3_noise_dbm;
uint32_t evm0;
uint32_t evm1;
uint32_t evm2;
uint32_t evm3;
} ppi_11n_macphy;
// Carrier setting
virtual carrier_type IEEE80211Carrier();
// Datalink checker
virtual int DatalinkType();
// Signal level fetcher
virtual int FetchSignalLevels(int *in_siglev, int *in_noiselev);
// Mangler
virtual int ManglePacket(kis_packet *packet, uint8_t *data, uint8_t *moddata);
// Mangle a prism2 datalink to a kismet packet
int Prism2KisPack(kis_packet *packet, uint8_t *data, uint8_t *moddata);
// Mangle a BSD header
int BSD2KisPack(kis_packet *packet, uint8_t *data, uint8_t *moddata);
// Mangle a radiotap header
#ifdef HAVE_RADIOTAP
int Radiotap2KisPack(kis_packet *packet, uint8_t *data, uint8_t *moddata);
#endif
int PPI2KisPack(kis_packet *packet, uint8_t *data, uint8_t *moddata);
pcap_t *pd;
int datalink_type;
// Do we do anything intelligent with the FCS?
int decode_fcs;
unsigned int *crc32_table;
// Some toggles for subclasses to use
int toggle0;
int toggle1;
};
// Open with pcap_dead for pcapfiles - we have a different open and we
// have to kluge fetching the packet descriptor
class PcapSourceFile : public PcapSource {
public:
PcapSourceFile(string in_name, string in_dev) : PcapSource(in_name, in_dev) { }
int OpenSource();
int FetchPacket(kis_packet *packet, uint8_t *data, uint8_t *moddata);
// int FetchDescriptor();
};
#ifdef SYS_LINUX
// What we need to track on a linux interface to restore the settings
typedef struct linux_ifparm {
int flags;
char essid[MAX_SSID_LEN + 1];
int channel;
int mode;
int privmode;
int prismhdr;
void *power; // Most things won't use this
};
#endif
// Wireless extention pcapsource - use wext to get the channels. Everything
// else is straight pcapsource
#ifdef HAVE_LINUX_WIRELESS
class PcapSourceWext : public PcapSource {
public:
PcapSourceWext(string in_name, string in_dev) : PcapSource(in_name, in_dev) {
modern_chancontrol = -1;
}
// Small tracker var for intelligent channel control in orinoco. I don't want to make
// a new class for 1 int
int modern_chancontrol;
protected:
virtual int FetchSignalLevels(int *in_siglev, int *in_noiselev);
};
// FCS trimming for wext cards
class PcapSourceWextFCS : public PcapSourceWext {
public:
PcapSourceWextFCS(string in_name, string in_dev) :
PcapSourceWext(in_name, in_dev) {
fcsbytes = 4;
}
};
// Override carrier detection for 11g cards like madwifi and prism54g.
class PcapSource11G : public PcapSourceWext {
public:
PcapSource11G(string in_name, string in_dev) :
PcapSourceWext(in_name, in_dev) { }
protected:
carrier_type IEEE80211Carrier();
};
// Override madwifi 11g for FCS
class PcapSource11GFCS : public PcapSource11G {
public:
PcapSource11GFCS(string in_name, string in_dev) :
PcapSource11G(in_name, in_dev) {
fcsbytes = 4;
}
};
#endif
#ifdef SYS_LINUX
// Override fcs controls to add 4 bytes on wlanng
class PcapSourceWlanng : public PcapSource {
public:
PcapSourceWlanng(string in_name, string in_dev) :
PcapSource(in_name, in_dev) {
fcsbytes = 4;
}
protected:
// Signal levels are pulled from the prism2 or avs headers so leave that as 0
int last_channel;
friend int chancontrol_wlanng_avs(const char *in_dev, int in_ch, char *in_err,
void *in_ext);
friend int chancontrol_wlanng(const char *in_dev, int in_ch, char *in_err,
void *in_ext);
};
// Override packet fetching logic on this one to discard jumbo corrupt packets
// that it likes to generate
class PcapSourceWrt54g : public PcapSource {
public:
PcapSourceWrt54g(string in_name, string in_dev) : PcapSource(in_name, in_dev) {
fcsbytes = 4;
}
int FetchPacket(kis_packet *packet, uint8_t *data, uint8_t *moddata);
void SetControlInt(string in_int) { control_int = in_int; }
string FetchControlInt() { return control_int; }
protected:
string control_int;
carrier_type IEEE80211Carrier();
};
#endif
#ifdef SYS_OPENBSD
class PcapSourceOpenBSDPrism : public PcapSource {
public:
PcapSourceOpenBSDPrism(string in_name, string in_dev) :
PcapSource(in_name, in_dev) { }
};
#endif
#if (defined(HAVE_RADIOTAP) && (defined(SYS_NETBSD) || defined(SYS_OPENBSD) || defined(SYS_FREEBSD)))
class RadiotapBSD {
public:
RadiotapBSD(const char *ifname);
virtual ~RadiotapBSD();
const char *geterror() const;
bool monitor_enable(int initch);
bool monitor_reset(int initch);
bool chancontrol(int in_ch);
bool getmediaopt(int& options, int& mode);
bool setmediaopt(int options, int mode);
bool getifflags(int& flags);
bool setifflags(int value);
bool get80211(int type, int& val, int len, u_int8_t *data);
bool set80211(int type, int val, int len, u_int8_t *data);
private:
void perror(const char *, ...);
void seterror(const char *, ...);
bool checksocket();
int s;
int prev_flags;
int prev_options;
int prev_mode;
int prev_chan;
char errstr[256];
string ifname;
};
class PcapSourceRadiotap : public PcapSource {
public:
PcapSourceRadiotap(string in_name, string in_dev) :
PcapSource(in_name, in_dev) { }
int OpenSource();
protected:
bool CheckForDLT(int dlt);
};
#endif
// ----------------------------------------------------------------------------
// Registrant and control functions
KisPacketSource *pcapsource_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsourcefcs_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_file_registrant(string in_name, string in_device,
char *in_err);
#ifdef HAVE_LINUX_WIRELESS
KisPacketSource *pcapsource_wext_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_wextfcs_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_ciscowifix_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_11g_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_11gfcs_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_11gfcschk_registrant(string in_name, string in_device,
char *in_err);
#endif
#ifdef SYS_LINUX
KisPacketSource *pcapsource_wlanng_registrant(string in_name, string in_device,
char *in_err);
KisPacketSource *pcapsource_wrt54g_registrant(string in_name, string in_device,
char *in_err);
#endif
#ifdef SYS_OPENBSD
KisPacketSource *pcapsource_openbsdprism2_registrant(string in_name, string in_device,
char *in_err);
#endif
#if (defined(HAVE_LIBPCAP) && defined(SYS_DARWIN))
KisPacketSource *pcapsource_darwin_registrant(string in_name, string in_device,
char *in_err);
#endif
#ifdef HAVE_RADIOTAP
KisPacketSource *pcapsource_radiotap_registrant(string in_name, string in_device,
char *in_err);
#endif
// Monitor activation
int unmonitor_pcapfile(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#ifdef HAVE_LINUX_WIRELESS
// Cisco (old)
int monitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_cisco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// Cisco (new)
int monitor_cisco_wifix(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// hostap prism2
int monitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_hostap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// orinoco
int monitor_orinoco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_orinoco(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// acx100
int monitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_acx100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// admtek
int monitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_admtek(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// ar5k
int monitor_vtar5k(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// Madwifi group of cards
int monitor_madwifi_a(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_madwifi_b(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_madwifi_g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_madwifi_comb(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_madwifi(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// prism54 needs to override the error messages it gets setting channels
int monitor_prism54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_prism54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// Centrino
int monitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_ipw2100(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_ipw2200(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_ipw2200(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_ipw3945(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_ipw3945(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int monitor_ipwlivetap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_ipwlivetap(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#ifdef HAVE_HILDON
// Nokia needs to set power mgmt off and restore it
int monitor_nokia(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_nokia(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#endif
// "Standard" wext monitor sequence - mostly a helper for other functions
// since most cards that use wext still have custom initialization that
// needs to be done.
int monitor_wext(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_wext(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#endif
#ifdef SYS_LINUX
// wlan-ng modern standard
int monitor_wlanng(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// wlan-ng avs
int monitor_wlanng_avs(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
// linksys wrt54g monitoring
int monitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_wrt54g(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#endif
// This should be expanded to handle BSD...
#ifdef SYS_OPENBSD
// openbsd prism2
int monitor_openbsd_prism2(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
#endif
// Channel controls
#ifdef HAVE_LINUX_WIRELESS
// Standard wireless extension controls
int chancontrol_wext(const char *in_dev, int in_ch, char *in_err, void *in_ext);
// Orinoco iwpriv control
int chancontrol_orinoco(const char *in_dev, int in_ch, char *in_err, void *in_ext);
// Madwifi needs to set mode
int chancontrol_madwifi_ab(const char *in_dev, int in_ch, char *in_err, void *in_ext);
int chancontrol_madwifi_ag(const char *in_dev, int in_ch, char *in_err, void *in_ext);
// Prism54 apparently returns a fail code on an iwconfig channel change but
// then works so we need to override the wext failure code
int chancontrol_prism54g(const char *in_dev, int in_ch, char *in_err, void *in_ext);
// We need a delay in it like orinoco, apparently
int chancontrol_ipw2100(const char *in_dev, int in_ch, char *in_err, void *in_ext);
int chancontrol_ipw2200(const char *in_dev, int in_ch, char *in_err, void *in_ext);
// Wrt54g needs to use the control interface instead
int chancontrol_wrt54g(const char *in_dev, int in_ch, char *in_err, void *in_ext);
#endif
#ifdef SYS_LINUX
// Modern wlan-ng and wlan-ng avs
int chancontrol_wlanng(const char *in_dev, int in_ch, char *in_err, void *in_ext);
int chancontrol_wlanng_avs(const char *in_dev, int in_ch, char *in_err, void *in_ext);
#endif
#ifdef SYS_OPENBSD
// openbsd prism2 controls
int chancontrol_openbsd_prism2(const char *in_dev, int in_ch, char *in_err,
void *in_ext);
#endif
#if (defined(HAVE_RADIOTAP) && (defined(SYS_NETBSD) || defined(SYS_OPENBSD) || defined(SYS_FREEBSD)))
int monitor_bsd(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_bsd(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int chancontrol_bsd(const char *in_dev, int in_ch, char *in_err, void *in_ext);
#endif
#ifdef SYS_DARWIN
int monitor_darwin(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int unmonitor_darwin(const char *in_dev, int initch, char *in_err, void **in_if, void *in_ext);
int chancontrol_darwin(const char *in_dev, int in_ch, char *in_err, void *in_ext);
#endif
#endif
#endif
|