OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-197
/
include
/
net
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/17/2022 06:42:18 AM
rwxr-xr-x
📄
6lowpan.h
10.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
9p
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
Space.h
1.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
act_api.h
6.38 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
addrconf.h
12.63 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
af_ieee802154.h
1.55 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
af_rxrpc.h
2.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
af_unix.h
2.22 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
af_vsock.h
7.21 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ah.h
382 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
arp.h
2 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
atmclip.h
1.48 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ax25.h
15.02 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ax88796.h
998 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📁
bluetooth
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
bond_3ad.h
9.79 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
bond_alb.h
6.6 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
bond_options.h
3.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bonding.h
19.1 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
busy_poll.h
3.8 KB
11/01/2022 04:52:05 PM
rw-r--r--
📁
caif
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
calipso.h
2.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cfg80211-wext.h
1.95 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cfg80211.h
221.24 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
cfg802154.h
10.89 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
checksum.h
4.76 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
cipso_ipv4.h
8.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cls_cgroup.h
2.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
codel.h
5.65 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
codel_impl.h
7.98 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
codel_qdisc.h
2.9 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
compat.h
2.11 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
datalink.h
619 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dcbevent.h
1.26 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dcbnl.h
4.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
devlink.h
13.25 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn.h
6.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn_dev.h
5.36 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn_fib.h
3.98 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn_neigh.h
968 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn_nsp.h
5.83 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dn_route.h
4.36 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dsa.h
13.94 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
dsfield.h
1.11 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dst.h
13.48 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
dst_cache.h
2.53 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dst_metadata.h
5.39 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
dst_ops.h
2 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
erspan.h
2.11 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
esp.h
877 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ethoc.h
538 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fib_notifier.h
1.29 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
fib_rules.h
4.18 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
firewire.h
636 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
flow.h
6.16 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
flow_dissector.h
7.55 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
fou.h
549 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fq.h
2.67 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
fq_impl.h
6.9 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
garp.h
2.62 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
gen_stats.h
2.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
genetlink.h
11.3 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
geneve.h
1.67 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
gre.h
2.99 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
gro_cells.h
443 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
gtp.h
633 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
gue.h
3.23 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hwbm.h
937 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
icmp.h
2.01 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ieee80211_radiotap.h
6.63 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ieee802154_netdev.h
9.14 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
if_inet6.h
6.13 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ife.h
1.06 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ila.h
498 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
inet6_connection_sock.h
976 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
inet6_hashtables.h
3.7 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
inet_common.h
1.89 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
inet_connection_sock.h
10.48 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inet_ecn.h
6.02 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inet_frag.h
4.51 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inet_hashtables.h
12.91 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inet_sock.h
8.25 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inet_timewait_sock.h
3.82 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
inetpeer.h
3.29 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip.h
18.51 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip6_checksum.h
2.89 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ip6_fib.h
10.04 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip6_route.h
7.63 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip6_tunnel.h
4.72 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip_fib.h
10.72 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip_tunnels.h
13.61 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ip_vs.h
46.78 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ipcomp.h
659 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ipconfig.h
811 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ipv6.h
29.97 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ipv6_frag.h
2.54 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
ipx.h
4.4 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
iucv
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
iw_handler.h
20.91 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kcm.h
4.96 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
l3mdev.h
5.86 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
lapb.h
4.75 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
lib80211.h
3.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc.h
4.41 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
llc_c_ac.h
9.31 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_c_ev.h
10.68 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_c_st.h
1.72 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_conn.h
4.06 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
llc_if.h
2.16 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_pdu.h
14.44 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
llc_s_ac.h
1.55 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_s_ev.h
2.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_s_st.h
947 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
llc_sap.h
1.08 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
lwtunnel.h
5.84 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mac80211.h
230.36 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
mac802154.h
15.27 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mip6.h
1.58 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mld.h
2.8 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mpls.h
932 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mpls_iptunnel.h
827 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mrp.h
3.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ncsi.h
1.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ndisc.h
13.77 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
neighbour.h
15.06 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
net_namespace.h
10.08 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
net_ratelimit.h
220 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
netevent.h
910 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📁
netfilter
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
netlabel.h
20.74 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
netlink.h
40.39 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
netns
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
netprio_cgroup.h
1.24 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
netrom.h
7.68 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
nexthop.h
865 bytes
11/01/2022 04:52:05 PM
rw-r--r--
📁
nfc
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
nl802154.h
12.09 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
nsh.h
12.31 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
p8022.h
447 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📁
phonet
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
ping.h
3.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pkt_cls.h
17.34 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
pkt_sched.h
4.05 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pptp.h
557 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
protocol.h
4.08 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
psample.h
860 bytes
11/01/2022 04:52:05 PM
rw-r--r--
📄
psnap.h
351 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
raw.h
2.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
rawv6.h
854 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
red.h
10.45 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
regulatory.h
10.12 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
request_sock.h
6.46 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
rose.h
7.62 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
route.h
10.02 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
rtnetlink.h
6.13 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
sch_generic.h
23.3 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
scm.h
3.5 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
sctp
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
secure_seq.h
855 bytes
11/01/2022 04:52:05 PM
rw-r--r--
📄
seg6.h
1.66 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
seg6_hmac.h
1.65 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
slhc_vj.h
6.67 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
smc.h
440 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
snmp.h
5.23 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
sock.h
69.75 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
sock_reuseport.h
863 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
stp.h
383 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
strparser.h
3.75 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
switchdev.h
6.52 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
tc_act
-
11/17/2022 06:42:23 AM
rwxr-xr-x
📄
tcp.h
62.8 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
tcp_states.h
1.26 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
timewait_sock.h
1.11 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tipc.h
2.34 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tls.h
7.12 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
transp_v6.h
2.08 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
tso.h
515 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
tun_proto.h
988 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
udp.h
12.82 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
udp_tunnel.h
5.12 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
udplite.h
3.83 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
vsock_addr.h
1.05 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
vxlan.h
10.43 KB
11/01/2022 04:52:05 PM
rw-r--r--
📄
wext.h
1.51 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
wimax.h
19.97 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
x25.h
9.43 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
x25device.h
387 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
xfrm.h
53.72 KB
11/01/2022 04:52:05 PM
rw-r--r--
Editing: mac802154.h
Close
/* * IEEE802.15.4-2003 specification * * Copyright (C) 2007-2012 Siemens AG * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program 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. * */ #ifndef NET_MAC802154_H #define NET_MAC802154_H #include <asm/unaligned.h> #include <net/af_ieee802154.h> #include <linux/ieee802154.h> #include <linux/skbuff.h> #include <net/cfg802154.h> /** * enum ieee802154_hw_addr_filt_flags - hardware address filtering flags * * The following flags are used to indicate changed address settings from * the stack to the hardware. * * @IEEE802154_AFILT_SADDR_CHANGED: Indicates that the short address will be * change. * * @IEEE802154_AFILT_IEEEADDR_CHANGED: Indicates that the extended address * will be change. * * @IEEE802154_AFILT_PANID_CHANGED: Indicates that the pan id will be change. * * @IEEE802154_AFILT_PANC_CHANGED: Indicates that the address filter will * do frame address filtering as a pan coordinator. */ enum ieee802154_hw_addr_filt_flags { IEEE802154_AFILT_SADDR_CHANGED = BIT(0), IEEE802154_AFILT_IEEEADDR_CHANGED = BIT(1), IEEE802154_AFILT_PANID_CHANGED = BIT(2), IEEE802154_AFILT_PANC_CHANGED = BIT(3), }; /** * struct ieee802154_hw_addr_filt - hardware address filtering settings * * @pan_id: pan_id which should be set to the hardware address filter. * * @short_addr: short_addr which should be set to the hardware address filter. * * @ieee_addr: extended address which should be set to the hardware address * filter. * * @pan_coord: boolean if hardware filtering should be operate as coordinator. */ struct ieee802154_hw_addr_filt { __le16 pan_id; __le16 short_addr; __le64 ieee_addr; bool pan_coord; }; /** * struct ieee802154_hw - ieee802154 hardware * * @extra_tx_headroom: headroom to reserve in each transmit skb for use by the * driver (e.g. for transmit headers.) * * @flags: hardware flags, see &enum ieee802154_hw_flags * * @parent: parent device of the hardware. * * @priv: pointer to private area that was allocated for driver use along with * this structure. * * @phy: This points to the &struct wpan_phy allocated for this 802.15.4 PHY. */ struct ieee802154_hw { /* filled by the driver */ int extra_tx_headroom; u32 flags; struct device *parent; void *priv; /* filled by mac802154 core */ struct wpan_phy *phy; }; /** * enum ieee802154_hw_flags - hardware flags * * These flags are used to indicate hardware capabilities to * the stack. Generally, flags here should have their meaning * done in a way that the simplest hardware doesn't need setting * any particular flags. There are some exceptions to this rule, * however, so you are advised to review these flags carefully. * * @IEEE802154_HW_TX_OMIT_CKSUM: Indicates that xmitter will add FCS on it's * own. * * @IEEE802154_HW_LBT: Indicates that transceiver will support listen before * transmit. * * @IEEE802154_HW_CSMA_PARAMS: Indicates that transceiver will support csma * parameters (max_be, min_be, backoff exponents). * * @IEEE802154_HW_FRAME_RETRIES: Indicates that transceiver will support ARET * frame retries setting. * * @IEEE802154_HW_AFILT: Indicates that transceiver will support hardware * address filter setting. * * @IEEE802154_HW_PROMISCUOUS: Indicates that transceiver will support * promiscuous mode setting. * * @IEEE802154_HW_RX_OMIT_CKSUM: Indicates that receiver omits FCS. * * @IEEE802154_HW_RX_DROP_BAD_CKSUM: Indicates that receiver will not filter * frames with bad checksum. */ enum ieee802154_hw_flags { IEEE802154_HW_TX_OMIT_CKSUM = BIT(0), IEEE802154_HW_LBT = BIT(1), IEEE802154_HW_CSMA_PARAMS = BIT(2), IEEE802154_HW_FRAME_RETRIES = BIT(3), IEEE802154_HW_AFILT = BIT(4), IEEE802154_HW_PROMISCUOUS = BIT(5), IEEE802154_HW_RX_OMIT_CKSUM = BIT(6), IEEE802154_HW_RX_DROP_BAD_CKSUM = BIT(7), }; /* Indicates that receiver omits FCS and xmitter will add FCS on it's own. */ #define IEEE802154_HW_OMIT_CKSUM (IEEE802154_HW_TX_OMIT_CKSUM | \ IEEE802154_HW_RX_OMIT_CKSUM) /* struct ieee802154_ops - callbacks from mac802154 to the driver * * This structure contains various callbacks that the driver may * handle or, in some cases, must handle, for example to transmit * a frame. * * start: Handler that 802.15.4 module calls for device initialization. * This function is called before the first interface is attached. * * stop: Handler that 802.15.4 module calls for device cleanup. * This function is called after the last interface is removed. * * xmit_sync: * Handler that 802.15.4 module calls for each transmitted frame. * skb cntains the buffer starting from the IEEE 802.15.4 header. * The low-level driver should send the frame based on available * configuration. This is called by a workqueue and useful for * synchronous 802.15.4 drivers. * This function should return zero or negative errno. * * WARNING: * This will be deprecated soon. We don't accept synced xmit callbacks * drivers anymore. * * xmit_async: * Handler that 802.15.4 module calls for each transmitted frame. * skb cntains the buffer starting from the IEEE 802.15.4 header. * The low-level driver should send the frame based on available * configuration. * This function should return zero or negative errno. * * ed: Handler that 802.15.4 module calls for Energy Detection. * This function should place the value for detected energy * (usually device-dependant) in the level pointer and return * either zero or negative errno. Called with pib_lock held. * * set_channel: * Set radio for listening on specific channel. * Set the device for listening on specified channel. * Returns either zero, or negative errno. Called with pib_lock held. * * set_hw_addr_filt: * Set radio for listening on specific address. * Set the device for listening on specified address. * Returns either zero, or negative errno. * * set_txpower: * Set radio transmit power in mBm. Called with pib_lock held. * Returns either zero, or negative errno. * * set_lbt * Enables or disables listen before talk on the device. Called with * pib_lock held. * Returns either zero, or negative errno. * * set_cca_mode * Sets the CCA mode used by the device. Called with pib_lock held. * Returns either zero, or negative errno. * * set_cca_ed_level * Sets the CCA energy detection threshold in mBm. Called with pib_lock * held. * Returns either zero, or negative errno. * * set_csma_params * Sets the CSMA parameter set for the PHY. Called with pib_lock held. * Returns either zero, or negative errno. * * set_frame_retries * Sets the retransmission attempt limit. Called with pib_lock held. * Returns either zero, or negative errno. * * set_promiscuous_mode * Enables or disable promiscuous mode. */ struct ieee802154_ops { struct module *owner; int (*start)(struct ieee802154_hw *hw); void (*stop)(struct ieee802154_hw *hw); int (*xmit_sync)(struct ieee802154_hw *hw, struct sk_buff *skb); int (*xmit_async)(struct ieee802154_hw *hw, struct sk_buff *skb); int (*ed)(struct ieee802154_hw *hw, u8 *level); int (*set_channel)(struct ieee802154_hw *hw, u8 page, u8 channel); int (*set_hw_addr_filt)(struct ieee802154_hw *hw, struct ieee802154_hw_addr_filt *filt, unsigned long changed); int (*set_txpower)(struct ieee802154_hw *hw, s32 mbm); int (*set_lbt)(struct ieee802154_hw *hw, bool on); int (*set_cca_mode)(struct ieee802154_hw *hw, const struct wpan_phy_cca *cca); int (*set_cca_ed_level)(struct ieee802154_hw *hw, s32 mbm); int (*set_csma_params)(struct ieee802154_hw *hw, u8 min_be, u8 max_be, u8 retries); int (*set_frame_retries)(struct ieee802154_hw *hw, s8 retries); int (*set_promiscuous_mode)(struct ieee802154_hw *hw, const bool on); }; /** * ieee802154_get_fc_from_skb - get the frame control field from an skb * @skb: skb where the frame control field will be get from */ static inline __le16 ieee802154_get_fc_from_skb(const struct sk_buff *skb) { __le16 fc; /* check if we can fc at skb_mac_header of sk buffer */ if (WARN_ON(!skb_mac_header_was_set(skb) || (skb_tail_pointer(skb) - skb_mac_header(skb)) < IEEE802154_FC_LEN)) return cpu_to_le16(0); memcpy(&fc, skb_mac_header(skb), IEEE802154_FC_LEN); return fc; } /** * ieee802154_skb_dst_pan - get the pointer to destination pan field * @fc: mac header frame control field * @skb: skb where the destination pan pointer will be get from */ static inline unsigned char *ieee802154_skb_dst_pan(__le16 fc, const struct sk_buff *skb) { unsigned char *dst_pan; switch (ieee802154_daddr_mode(fc)) { case cpu_to_le16(IEEE802154_FCTL_ADDR_NONE): dst_pan = NULL; break; case cpu_to_le16(IEEE802154_FCTL_DADDR_SHORT): case cpu_to_le16(IEEE802154_FCTL_DADDR_EXTENDED): dst_pan = skb_mac_header(skb) + IEEE802154_FC_LEN + IEEE802154_SEQ_LEN; break; default: WARN_ONCE(1, "invalid addr mode detected"); dst_pan = NULL; break; } return dst_pan; } /** * ieee802154_skb_src_pan - get the pointer to source pan field * @fc: mac header frame control field * @skb: skb where the source pan pointer will be get from */ static inline unsigned char *ieee802154_skb_src_pan(__le16 fc, const struct sk_buff *skb) { unsigned char *src_pan; switch (ieee802154_saddr_mode(fc)) { case cpu_to_le16(IEEE802154_FCTL_ADDR_NONE): src_pan = NULL; break; case cpu_to_le16(IEEE802154_FCTL_SADDR_SHORT): case cpu_to_le16(IEEE802154_FCTL_SADDR_EXTENDED): /* if intra-pan and source addr mode is non none, * then source pan id is equal destination pan id. */ if (ieee802154_is_intra_pan(fc)) { src_pan = ieee802154_skb_dst_pan(fc, skb); break; } switch (ieee802154_daddr_mode(fc)) { case cpu_to_le16(IEEE802154_FCTL_ADDR_NONE): src_pan = skb_mac_header(skb) + IEEE802154_FC_LEN + IEEE802154_SEQ_LEN; break; case cpu_to_le16(IEEE802154_FCTL_DADDR_SHORT): src_pan = skb_mac_header(skb) + IEEE802154_FC_LEN + IEEE802154_SEQ_LEN + IEEE802154_PAN_ID_LEN + IEEE802154_SHORT_ADDR_LEN; break; case cpu_to_le16(IEEE802154_FCTL_DADDR_EXTENDED): src_pan = skb_mac_header(skb) + IEEE802154_FC_LEN + IEEE802154_SEQ_LEN + IEEE802154_PAN_ID_LEN + IEEE802154_EXTENDED_ADDR_LEN; break; default: WARN_ONCE(1, "invalid addr mode detected"); src_pan = NULL; break; } break; default: WARN_ONCE(1, "invalid addr mode detected"); src_pan = NULL; break; } return src_pan; } /** * ieee802154_skb_is_intra_pan_addressing - checks whenever the mac addressing * is an intra pan communication * @fc: mac header frame control field * @skb: skb where the source and destination pan should be get from */ static inline bool ieee802154_skb_is_intra_pan_addressing(__le16 fc, const struct sk_buff *skb) { unsigned char *dst_pan = ieee802154_skb_dst_pan(fc, skb), *src_pan = ieee802154_skb_src_pan(fc, skb); /* if one is NULL is no intra pan addressing */ if (!dst_pan || !src_pan) return false; return !memcmp(dst_pan, src_pan, IEEE802154_PAN_ID_LEN); } /** * ieee802154_be64_to_le64 - copies and convert be64 to le64 * @le64_dst: le64 destination pointer * @be64_src: be64 source pointer */ static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src) { put_unaligned_le64(get_unaligned_be64(be64_src), le64_dst); } /** * ieee802154_le64_to_be64 - copies and convert le64 to be64 * @be64_dst: be64 destination pointer * @le64_src: le64 source pointer */ static inline void ieee802154_le64_to_be64(void *be64_dst, const void *le64_src) { put_unaligned_be64(get_unaligned_le64(le64_src), be64_dst); } /** * ieee802154_le16_to_be16 - copies and convert le16 to be16 * @be16_dst: be16 destination pointer * @le16_src: le16 source pointer */ static inline void ieee802154_le16_to_be16(void *be16_dst, const void *le16_src) { put_unaligned_be16(get_unaligned_le16(le16_src), be16_dst); } /** * ieee802154_be16_to_le16 - copies and convert be16 to le16 * @le16_dst: le16 destination pointer * @be16_src: be16 source pointer */ static inline void ieee802154_be16_to_le16(void *le16_dst, const void *be16_src) { put_unaligned_le16(get_unaligned_be16(be16_src), le16_dst); } /** * ieee802154_alloc_hw - Allocate a new hardware device * * This must be called once for each hardware device. The returned pointer * must be used to refer to this device when calling other functions. * mac802154 allocates a private data area for the driver pointed to by * @priv in &struct ieee802154_hw, the size of this area is given as * @priv_data_len. * * @priv_data_len: length of private data * @ops: callbacks for this device * * Return: A pointer to the new hardware device, or %NULL on error. */ struct ieee802154_hw * ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops); /** * ieee802154_free_hw - free hardware descriptor * * This function frees everything that was allocated, including the * private data for the driver. You must call ieee802154_unregister_hw() * before calling this function. * * @hw: the hardware to free */ void ieee802154_free_hw(struct ieee802154_hw *hw); /** * ieee802154_register_hw - Register hardware device * * You must call this function before any other functions in * mac802154. Note that before a hardware can be registered, you * need to fill the contained wpan_phy's information. * * @hw: the device to register as returned by ieee802154_alloc_hw() * * Return: 0 on success. An error code otherwise. */ int ieee802154_register_hw(struct ieee802154_hw *hw); /** * ieee802154_unregister_hw - Unregister a hardware device * * This function instructs mac802154 to free allocated resources * and unregister netdevices from the networking subsystem. * * @hw: the hardware to unregister */ void ieee802154_unregister_hw(struct ieee802154_hw *hw); /** * ieee802154_rx_irqsafe - receive frame * * Like ieee802154_rx() but can be called in IRQ context * (internally defers to a tasklet.) * * @hw: the hardware this frame came in on * @skb: the buffer to receive, owned by mac802154 after this call * @lqi: link quality indicator */ void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi); /** * ieee802154_wake_queue - wake ieee802154 queue * @hw: pointer as obtained from ieee802154_alloc_hw(). * * Drivers should use this function instead of netif_wake_queue. */ void ieee802154_wake_queue(struct ieee802154_hw *hw); /** * ieee802154_stop_queue - stop ieee802154 queue * @hw: pointer as obtained from ieee802154_alloc_hw(). * * Drivers should use this function instead of netif_stop_queue. */ void ieee802154_stop_queue(struct ieee802154_hw *hw); /** * ieee802154_xmit_complete - frame transmission complete * * @hw: pointer as obtained from ieee802154_alloc_hw(). * @skb: buffer for transmission * @ifs_handling: indicate interframe space handling */ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, bool ifs_handling); #endif /* NET_MAC802154_H */