xref: /dflybsd-src/contrib/wpa_supplicant/src/drivers/driver_wired_common.h (revision 3a84a4273475ed07d0ab1c2dfeffdfedef35d9cd)
1*a1157835SDaniel Fojt /*
2*a1157835SDaniel Fojt  * Common definitions for Wired Ethernet driver interfaces
3*a1157835SDaniel Fojt  * Copyright (c) 2005-2009, Jouni Malinen <j@w1.fi>
4*a1157835SDaniel Fojt  * Copyright (c) 2004, Gunter Burchardt <tira@isx.de>
5*a1157835SDaniel Fojt  *
6*a1157835SDaniel Fojt  * This software may be distributed under the terms of the BSD license.
7*a1157835SDaniel Fojt  * See README for more details.
8*a1157835SDaniel Fojt  */
9*a1157835SDaniel Fojt 
10*a1157835SDaniel Fojt #ifndef DRIVER_WIRED_COMMON_H
11*a1157835SDaniel Fojt #define DRIVER_WIRED_COMMON_H
12*a1157835SDaniel Fojt 
13*a1157835SDaniel Fojt struct driver_wired_common_data {
14*a1157835SDaniel Fojt 	char ifname[IFNAMSIZ + 1];
15*a1157835SDaniel Fojt 	void *ctx;
16*a1157835SDaniel Fojt 
17*a1157835SDaniel Fojt 	int sock; /* raw packet socket for driver access */
18*a1157835SDaniel Fojt 	int pf_sock;
19*a1157835SDaniel Fojt 	int membership, multi, iff_allmulti, iff_up;
20*a1157835SDaniel Fojt };
21*a1157835SDaniel Fojt 
22*a1157835SDaniel Fojt static const u8 pae_group_addr[ETH_ALEN] =
23*a1157835SDaniel Fojt { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 };
24*a1157835SDaniel Fojt 
25*a1157835SDaniel Fojt int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add);
26*a1157835SDaniel Fojt int driver_wired_get_ssid(void *priv, u8 *ssid);
27*a1157835SDaniel Fojt int driver_wired_get_bssid(void *priv, u8 *bssid);
28*a1157835SDaniel Fojt int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa);
29*a1157835SDaniel Fojt 
30*a1157835SDaniel Fojt int driver_wired_init_common(struct driver_wired_common_data *common,
31*a1157835SDaniel Fojt 			     const char *ifname, void *ctx);
32*a1157835SDaniel Fojt void driver_wired_deinit_common(struct driver_wired_common_data *common);
33*a1157835SDaniel Fojt 
34*a1157835SDaniel Fojt #endif /* DRIVER_WIRED_COMMON_H */
35