-
Notifications
You must be signed in to change notification settings - Fork 655
/
AirportItlwmEthernetInterface.hpp
48 lines (37 loc) · 1.54 KB
/
AirportItlwmEthernetInterface.hpp
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
//
// AirportItlwmEthernetInterface.hpp
// AirportItlwm-Sonoma
//
// Created by qcwap on 2023/6/27.
// Copyright © 2023 钟先耀. All rights reserved.
//
#ifndef AirportItlwmEthernetInterface_hpp
#define AirportItlwmEthernetInterface_hpp
extern "C" {
#include <net/bpf.h>
}
#include "Airport/Apple80211.h"
#include <IOKit/IOLib.h>
#include <libkern/OSKextLib.h>
#include <sys/kernel_types.h>
#include <IOKit/network/IOEthernetInterface.h>
class AirportItlwmEthernetInterface : public IOEthernetInterface {
OSDeclareDefaultStructors(AirportItlwmEthernetInterface)
public:
virtual IOReturn attachToDataLinkLayer( IOOptionBits options,
void * parameter ) override;
virtual bool initWithSkywalkInterfaceAndProvider(IONetworkController *controller, IO80211SkywalkInterface *interface);
virtual bool setLinkState(IO80211LinkState state);
static errno_t bpfOutputPacket(ifnet_t interface, u_int32_t data_link_type,
mbuf_t packet);
static errno_t bpfTap(ifnet_t interface, u_int32_t data_link_type,
bpf_tap_mode direction);
virtual UInt32 inputPacket(
mbuf_t packet,
UInt32 length = 0,
IOOptionBits options = 0,
void * param = 0 ) override;
private:
IO80211SkywalkInterface *interface;
};
#endif /* AirportItlwmEthernetInterface_hpp */