2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
7 * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi>
8 * Sun elects to license this software under the BSD license.
9 * See README for more details.
14 #pragma ident "%Z%%M% %I% %E% SMI"
20 #include <sys/types.h>
24 #define IEEE80211_MTU_MAX 2304
26 struct l2_packet_data
{
27 dlpi_handle_t dh
; /* dlpi handle for EAPOL frames */
28 char ifname
[DLPI_LINKNAME_MAX
];
29 uint8_t own_addr
[IEEE80211_ADDR_LEN
];
30 void (*rx_callback
)(void *, unsigned char *,
31 unsigned char *, size_t);
32 void *rx_callback_ctx
;
37 uint8_t h_dest
[IEEE80211_ADDR_LEN
];
38 uint8_t h_source
[IEEE80211_ADDR_LEN
];
43 struct l2_packet_data
*l2_packet_init(
44 const char *, unsigned short,
45 void (*rx_callback
)(void *, unsigned char *,
46 unsigned char *, size_t),
48 void l2_packet_deinit(struct l2_packet_data
*);
50 int l2_packet_get_own_addr(struct l2_packet_data
*, uint8_t *);
51 int l2_packet_send(struct l2_packet_data
*, uint8_t *, size_t);
57 #endif /* __L2_PACKET_H */