Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.52
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
linux-headers-6.8.0-136 /
include /
net /
Delete
Unzip
Name
Size
Permission
Date
Action
9p
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
bluetooth
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
caif
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
iucv
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
mana
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
netfilter
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
netns
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
nfc
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
page_pool
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
phonet
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
sctp
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
tc_act
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
6lowpan.h
10.03
KB
-rw-r--r--
2024-03-10 20:38
Space.h
455
B
-rw-r--r--
2024-03-10 20:38
act_api.h
9.35
KB
-rw-r--r--
2026-07-01 19:48
addrconf.h
14.28
KB
-rw-r--r--
2026-07-01 19:48
af_ieee802154.h
1.19
KB
-rw-r--r--
2024-03-10 20:38
af_rxrpc.h
3.3
KB
-rw-r--r--
2024-03-10 20:38
af_unix.h
3.76
KB
-rw-r--r--
2026-07-01 19:48
af_vsock.h
8.41
KB
-rw-r--r--
2026-07-01 19:48
ah.h
382
B
-rw-r--r--
2024-03-10 20:38
amt.h
8.35
KB
-rw-r--r--
2024-03-10 20:38
arp.h
1.95
KB
-rw-r--r--
2024-03-10 20:38
atmclip.h
1.48
KB
-rw-r--r--
2024-03-10 20:38
ax25.h
14.94
KB
-rw-r--r--
2026-07-01 19:48
ax88796.h
1.43
KB
-rw-r--r--
2024-03-10 20:38
bareudp.h
333
B
-rw-r--r--
2024-03-10 20:38
bond_3ad.h
9.5
KB
-rw-r--r--
2026-07-01 19:48
bond_alb.h
6.1
KB
-rw-r--r--
2024-03-10 20:38
bond_options.h
4.88
KB
-rw-r--r--
2026-07-01 19:48
bonding.h
21.5
KB
-rw-r--r--
2026-07-01 19:48
bpf_sk_storage.h
1.74
KB
-rw-r--r--
2024-03-10 20:38
busy_poll.h
4.28
KB
-rw-r--r--
2026-07-01 19:48
calipso.h
1.55
KB
-rw-r--r--
2024-03-10 20:38
cfg80211-wext.h
1.86
KB
-rw-r--r--
2024-03-10 20:38
cfg80211.h
336.64
KB
-rw-r--r--
2026-07-01 19:48
cfg802154.h
16.68
KB
-rw-r--r--
2026-07-01 19:48
checksum.h
4.98
KB
-rw-r--r--
2026-07-01 19:48
cipso_ipv4.h
7.37
KB
-rw-r--r--
2024-03-10 20:38
cls_cgroup.h
2.04
KB
-rw-r--r--
2026-07-01 19:48
codel.h
5.86
KB
-rw-r--r--
2024-03-10 20:38
codel_impl.h
8.3
KB
-rw-r--r--
2024-03-10 20:38
codel_qdisc.h
2.95
KB
-rw-r--r--
2024-03-10 20:38
compat.h
2.48
KB
-rw-r--r--
2024-03-10 20:38
datalink.h
590
B
-rw-r--r--
2024-03-10 20:38
dcbevent.h
766
B
-rw-r--r--
2024-03-10 20:38
dcbnl.h
4.98
KB
-rw-r--r--
2024-03-10 20:38
devlink.h
70.92
KB
-rw-r--r--
2024-03-10 20:38
dropreason-core.h
14.76
KB
-rw-r--r--
2026-07-01 19:48
dropreason.h
1.36
KB
-rw-r--r--
2024-03-10 20:38
dsa.h
41.09
KB
-rw-r--r--
2026-07-01 19:48
dsa_stubs.h
1.28
KB
-rw-r--r--
2024-03-10 20:38
dsfield.h
1.12
KB
-rw-r--r--
2024-03-10 20:38
dst.h
15.12
KB
-rw-r--r--
2026-07-01 19:48
dst_cache.h
2.96
KB
-rw-r--r--
2024-03-10 20:38
dst_metadata.h
6.34
KB
-rw-r--r--
2024-03-10 20:38
dst_ops.h
2.07
KB
-rw-r--r--
2026-07-01 19:48
erspan.h
9.04
KB
-rw-r--r--
2024-03-10 20:38
esp.h
1.18
KB
-rw-r--r--
2024-03-10 20:38
espintcp.h
966
B
-rw-r--r--
2024-03-10 20:38
ethoc.h
439
B
-rw-r--r--
2024-03-10 20:38
failover.h
1.18
KB
-rw-r--r--
2024-03-10 20:38
fib_notifier.h
1.35
KB
-rw-r--r--
2024-03-10 20:38
fib_rules.h
5.39
KB
-rw-r--r--
2024-03-10 20:38
firewire.h
599
B
-rw-r--r--
2024-03-10 20:38
flow.h
4.96
KB
-rw-r--r--
2024-03-10 20:38
flow_dissector.h
11.95
KB
-rw-r--r--
2024-03-10 20:38
flow_offload.h
17.37
KB
-rw-r--r--
2024-03-10 20:38
fou.h
578
B
-rw-r--r--
2024-03-10 20:38
fq.h
2.41
KB
-rw-r--r--
2024-03-10 20:38
fq_impl.h
7.96
KB
-rw-r--r--
2024-03-10 20:38
garp.h
2.67
KB
-rw-r--r--
2024-03-10 20:38
gen_stats.h
2.99
KB
-rw-r--r--
2024-03-10 20:38
genetlink.h
19.62
KB
-rw-r--r--
2026-07-01 19:48
geneve.h
1.84
KB
-rw-r--r--
2024-03-10 20:38
gre.h
3.29
KB
-rw-r--r--
2024-03-10 20:38
gro.h
13.38
KB
-rw-r--r--
2026-07-01 19:48
gro_cells.h
443
B
-rw-r--r--
2024-03-10 20:38
gso.h
3.2
KB
-rw-r--r--
2024-03-10 20:38
gtp.h
1.46
KB
-rw-r--r--
2024-03-10 20:38
gue.h
3.29
KB
-rw-r--r--
2024-03-10 20:38
handshake.h
1.39
KB
-rw-r--r--
2024-03-10 20:38
hwbm.h
995
B
-rw-r--r--
2024-03-10 20:38
icmp.h
1.87
KB
-rw-r--r--
2024-03-10 20:38
ieee80211_radiotap.h
23.22
KB
-rw-r--r--
2026-07-01 19:48
ieee802154_netdev.h
13.02
KB
-rw-r--r--
2024-03-10 20:38
if_inet6.h
6.6
KB
-rw-r--r--
2024-03-10 20:38
ife.h
1.03
KB
-rw-r--r--
2024-03-10 20:38
inet6_connection_sock.h
794
B
-rw-r--r--
2024-03-10 20:38
inet6_hashtables.h
5.57
KB
-rw-r--r--
2026-07-01 19:48
inet_common.h
2.83
KB
-rw-r--r--
2024-03-10 20:38
inet_connection_sock.h
11.7
KB
-rw-r--r--
2026-07-01 19:48
inet_dscp.h
1.55
KB
-rw-r--r--
2024-03-10 20:38
inet_ecn.h
7.83
KB
-rw-r--r--
2024-03-10 20:38
inet_frag.h
5.25
KB
-rw-r--r--
2026-07-01 19:48
inet_hashtables.h
16.91
KB
-rw-r--r--
2026-07-01 19:48
inet_sock.h
11.36
KB
-rw-r--r--
2026-07-01 19:48
inet_timewait_sock.h
3.71
KB
-rw-r--r--
2026-07-01 19:48
inetpeer.h
3.23
KB
-rw-r--r--
2026-07-01 19:48
ioam6.h
1.24
KB
-rw-r--r--
2026-07-01 19:48
ip.h
23.13
KB
-rw-r--r--
2026-07-01 19:48
ip6_checksum.h
2.3
KB
-rw-r--r--
2024-03-10 20:38
ip6_fib.h
17.6
KB
-rw-r--r--
2026-07-01 19:48
ip6_route.h
10.18
KB
-rw-r--r--
2026-07-01 19:48
ip6_tunnel.h
5.31
KB
-rw-r--r--
2026-07-01 19:48
ip_fib.h
16.13
KB
-rw-r--r--
2026-07-01 19:48
ip_tunnels.h
16.89
KB
-rw-r--r--
2026-07-01 19:48
ip_vs.h
53.83
KB
-rw-r--r--
2024-03-10 20:38
ipcomp.h
737
B
-rw-r--r--
2024-03-10 20:38
ipconfig.h
837
B
-rw-r--r--
2024-03-10 20:38
ipv6.h
37.62
KB
-rw-r--r--
2026-07-01 19:48
ipv6_frag.h
3.38
KB
-rw-r--r--
2024-03-10 20:38
ipv6_stubs.h
3.75
KB
-rw-r--r--
2026-07-01 19:48
iw_handler.h
20.66
KB
-rw-r--r--
2024-03-10 20:38
kcm.h
4.84
KB
-rw-r--r--
2026-07-01 19:48
l3mdev.h
7.03
KB
-rw-r--r--
2026-07-01 19:48
lag.h
409
B
-rw-r--r--
2024-03-10 20:38
lapb.h
4.82
KB
-rw-r--r--
2026-07-01 19:48
lib80211.h
3.92
KB
-rw-r--r--
2024-03-10 20:38
llc.h
4.41
KB
-rw-r--r--
2024-03-10 20:38
llc_c_ac.h
9.32
KB
-rw-r--r--
2024-03-10 20:38
llc_c_ev.h
10.61
KB
-rw-r--r--
2024-03-10 20:38
llc_c_st.h
1.77
KB
-rw-r--r--
2024-03-10 20:38
llc_conn.h
4.11
KB
-rw-r--r--
2024-03-10 20:38
llc_if.h
2.17
KB
-rw-r--r--
2024-03-10 20:38
llc_pdu.h
14.46
KB
-rw-r--r--
2024-03-10 20:38
llc_s_ac.h
1.59
KB
-rw-r--r--
2024-03-10 20:38
llc_s_ev.h
2.22
KB
-rw-r--r--
2024-03-10 20:38
llc_s_st.h
1.03
KB
-rw-r--r--
2024-03-10 20:38
llc_sap.h
1.08
KB
-rw-r--r--
2024-03-10 20:38
lwtunnel.h
6.69
KB
-rw-r--r--
2026-07-01 19:48
mac80211.h
293.31
KB
-rw-r--r--
2026-07-01 19:48
mac802154.h
14.88
KB
-rw-r--r--
2024-03-10 20:38
macsec.h
10.53
KB
-rw-r--r--
2026-07-01 19:48
mctp.h
8.1
KB
-rw-r--r--
2026-07-01 19:48
mctpdevice.h
1.26
KB
-rw-r--r--
2024-03-10 20:38
mip6.h
1016
B
-rw-r--r--
2024-03-10 20:38
mld.h
2.85
KB
-rw-r--r--
2024-03-10 20:38
mpls.h
943
B
-rw-r--r--
2024-03-10 20:38
mpls_iptunnel.h
481
B
-rw-r--r--
2024-03-10 20:38
mptcp.h
7.41
KB
-rw-r--r--
2024-03-10 20:38
mrp.h
3.13
KB
-rw-r--r--
2024-03-10 20:38
ncsi.h
1.94
KB
-rw-r--r--
2024-03-10 20:38
ndisc.h
14.64
KB
-rw-r--r--
2024-03-10 20:38
neighbour.h
16.55
KB
-rw-r--r--
2026-07-01 19:48
net_debug.h
5.08
KB
-rw-r--r--
2026-07-01 19:48
net_failover.h
1023
B
-rw-r--r--
2024-03-10 20:38
net_namespace.h
14.36
KB
-rw-r--r--
2026-07-01 19:48
net_ratelimit.h
220
B
-rw-r--r--
2024-03-10 20:38
net_trackers.h
424
B
-rw-r--r--
2024-03-10 20:38
netdev_queues.h
5.75
KB
-rw-r--r--
2024-03-10 20:38
netdev_rx_queue.h
1.32
KB
-rw-r--r--
2024-03-10 20:38
netevent.h
1.04
KB
-rw-r--r--
2024-03-10 20:38
netkit.h
1.16
KB
-rw-r--r--
2024-03-10 20:38
netlabel.h
20.15
KB
-rw-r--r--
2026-07-01 19:48
netlink.h
64.18
KB
-rw-r--r--
2024-03-10 20:38
netprio_cgroup.h
1.02
KB
-rw-r--r--
2024-03-10 20:38
netrom.h
7.73
KB
-rw-r--r--
2024-03-10 20:38
nexthop.h
11.91
KB
-rw-r--r--
2024-03-10 20:38
nl802154.h
16.04
KB
-rw-r--r--
2024-03-10 20:38
nsh.h
12.3
KB
-rw-r--r--
2024-03-10 20:38
p8022.h
403
B
-rw-r--r--
2024-03-10 20:38
pie.h
3.61
KB
-rw-r--r--
2026-07-01 19:48
ping.h
2.66
KB
-rw-r--r--
2024-03-10 20:38
pkt_cls.h
25.52
KB
-rw-r--r--
2026-07-01 19:48
pkt_sched.h
7.74
KB
-rw-r--r--
2026-07-01 19:48
pptp.h
604
B
-rw-r--r--
2024-03-10 20:38
protocol.h
3.81
KB
-rw-r--r--
2024-03-10 20:38
psample.h
1.06
KB
-rw-r--r--
2024-03-10 20:38
psnap.h
430
B
-rw-r--r--
2024-03-10 20:38
raw.h
2.46
KB
-rw-r--r--
2024-03-10 20:38
rawv6.h
862
B
-rw-r--r--
2024-03-10 20:38
red.h
11.33
KB
-rw-r--r--
2024-03-10 20:38
regulatory.h
9.96
KB
-rw-r--r--
2024-03-10 20:38
request_sock.h
6.5
KB
-rw-r--r--
2024-03-10 20:38
rose.h
8.06
KB
-rw-r--r--
2026-07-01 19:48
route.h
11.32
KB
-rw-r--r--
2026-07-01 19:48
rpl.h
749
B
-rw-r--r--
2024-03-10 20:38
rsi_91x.h
1.67
KB
-rw-r--r--
2024-03-10 20:38
rtnetlink.h
7.58
KB
-rw-r--r--
2026-07-01 19:48
rtnh.h
859
B
-rw-r--r--
2024-03-10 20:38
sch_generic.h
35.08
KB
-rw-r--r--
2026-07-01 19:48
scm.h
5.36
KB
-rw-r--r--
2026-07-01 19:48
secure_seq.h
868
B
-rw-r--r--
2024-03-10 20:38
seg6.h
2.18
KB
-rw-r--r--
2024-03-10 20:38
seg6_hmac.h
1.44
KB
-rw-r--r--
2024-03-10 20:38
seg6_local.h
644
B
-rw-r--r--
2024-03-10 20:38
selftests.h
582
B
-rw-r--r--
2024-03-10 20:38
slhc_vj.h
6.67
KB
-rw-r--r--
2024-03-10 20:38
smc.h
2.5
KB
-rw-r--r--
2026-07-01 19:48
snmp.h
5.14
KB
-rw-r--r--
2024-03-10 20:38
sock.h
85.78
KB
-rw-r--r--
2026-07-01 19:48
sock_reuseport.h
1.83
KB
-rw-r--r--
2024-03-10 20:38
stp.h
412
B
-rw-r--r--
2024-03-10 20:38
strparser.h
4.34
KB
-rw-r--r--
2026-07-01 19:48
switchdev.h
15.1
KB
-rw-r--r--
2024-03-10 20:38
tc_wrapper.h
6.29
KB
-rw-r--r--
2026-07-01 19:48
tcp.h
85.12
KB
-rw-r--r--
2026-07-01 19:48
tcp_ao.h
12.08
KB
-rw-r--r--
2026-07-01 19:48
tcp_states.h
1.3
KB
-rw-r--r--
2024-03-10 20:38
tcx.h
4.3
KB
-rw-r--r--
2026-07-01 19:48
timewait_sock.h
925
B
-rw-r--r--
2024-03-10 20:38
tipc.h
2.35
KB
-rw-r--r--
2024-03-10 20:38
tls.h
13.28
KB
-rw-r--r--
2026-07-01 19:48
tls_prot.h
1.84
KB
-rw-r--r--
2024-03-10 20:38
tls_toe.h
2.94
KB
-rw-r--r--
2024-03-10 20:38
transp_v6.h
1.88
KB
-rw-r--r--
2024-03-10 20:38
tso.h
721
B
-rw-r--r--
2024-03-10 20:38
tun_proto.h
1015
B
-rw-r--r--
2024-03-10 20:38
udp.h
15.88
KB
-rw-r--r--
2026-07-01 19:48
udp_tunnel.h
12.49
KB
-rw-r--r--
2026-07-01 19:48
udplite.h
2.3
KB
-rw-r--r--
2024-03-10 20:38
vsock_addr.h
662
B
-rw-r--r--
2024-03-10 20:38
vxlan.h
15.83
KB
-rw-r--r--
2026-07-01 19:48
wext.h
1.47
KB
-rw-r--r--
2024-03-10 20:38
x25.h
9.46
KB
-rw-r--r--
2024-03-10 20:38
x25device.h
387
B
-rw-r--r--
2024-03-10 20:38
xdp.h
16.93
KB
-rw-r--r--
2026-07-01 19:48
xdp_priv.h
427
B
-rw-r--r--
2024-03-10 20:38
xdp_sock.h
6.3
KB
-rw-r--r--
2026-07-01 19:48
xdp_sock_drv.h
10.15
KB
-rw-r--r--
2026-07-01 19:48
xfrm.h
58.29
KB
-rw-r--r--
2026-07-01 19:48
xsk_buff_pool.h
7.09
KB
-rw-r--r--
2026-07-01 19:48
Save
Rename
/* SPDX-License-Identifier: GPL-2.0 */ /* * Management Component Transport Protocol (MCTP) * * Copyright (c) 2021 Code Construct * Copyright (c) 2021 Google */ #ifndef __NET_MCTP_H #define __NET_MCTP_H #include <linux/bits.h> #include <linux/mctp.h> #include <linux/netdevice.h> #include <net/net_namespace.h> #include <net/sock.h> /* MCTP packet definitions */ struct mctp_hdr { u8 ver; u8 dest; u8 src; u8 flags_seq_tag; }; #define MCTP_VER_MIN 1 #define MCTP_VER_MAX 1 /* Definitions for ver field */ #define MCTP_HDR_VER_MASK GENMASK(3, 0) /* Definitions for flags_seq_tag field */ #define MCTP_HDR_FLAG_SOM BIT(7) #define MCTP_HDR_FLAG_EOM BIT(6) #define MCTP_HDR_FLAG_TO BIT(3) #define MCTP_HDR_FLAGS GENMASK(5, 3) #define MCTP_HDR_SEQ_SHIFT 4 #define MCTP_HDR_SEQ_MASK GENMASK(1, 0) #define MCTP_HDR_TAG_SHIFT 0 #define MCTP_HDR_TAG_MASK GENMASK(2, 0) #define MCTP_INITIAL_DEFAULT_NET 1 static inline bool mctp_address_unicast(mctp_eid_t eid) { return eid >= 8 && eid < 255; } static inline bool mctp_address_broadcast(mctp_eid_t eid) { return eid == 255; } static inline bool mctp_address_null(mctp_eid_t eid) { return eid == 0; } static inline bool mctp_address_matches(mctp_eid_t match, mctp_eid_t eid) { return match == eid || match == MCTP_ADDR_ANY; } static inline struct mctp_hdr *mctp_hdr(struct sk_buff *skb) { return (struct mctp_hdr *)skb_network_header(skb); } /* socket implementation */ struct mctp_sock { struct sock sk; /* bind() params */ unsigned int bind_net; mctp_eid_t bind_addr; __u8 bind_type; /* sendmsg()/recvmsg() uses struct sockaddr_mctp_ext */ bool addr_ext; /* list of mctp_sk_key, for incoming tag lookup. updates protected * by sk->net->keys_lock */ struct hlist_head keys; /* mechanism for expiring allocated keys; will release an allocated * tag, and any netdev state for a request/response pairing */ struct timer_list key_expiry; }; /* Key for matching incoming packets to sockets or reassembly contexts. * Packets are matched on (src,dest,tag). * * Lifetime / locking requirements: * * - individual key data (ie, the struct itself) is protected by key->lock; * changes must be made with that lock held. * * - the lookup fields: peer_addr, local_addr and tag are set before the * key is added to lookup lists, and never updated. * * - A ref to the key must be held (throuh key->refs) if a pointer to the * key is to be accessed after key->lock is released. * * - a mctp_sk_key contains a reference to a struct sock; this is valid * for the life of the key. On sock destruction (through unhash), the key is * removed from lists (see below), and marked invalid. * * - these mctp_sk_keys appear on two lists: * 1) the struct mctp_sock->keys list * 2) the struct netns_mctp->keys list * * presences on these lists requires a (single) refcount to be held; both * lists are updated as a single operation. * * Updates and lookups in either list are performed under the * netns_mctp->keys lock. Lookup functions will need to lock the key and * take a reference before unlocking the keys_lock. Consequently, the list's * keys_lock *cannot* be acquired with the individual key->lock held. * * - a key may have a sk_buff attached as part of an in-progress message * reassembly (->reasm_head). The reasm data is protected by the individual * key->lock. * * - there are two destruction paths for a mctp_sk_key: * * - through socket unhash (see mctp_sk_unhash). This performs the list * removal under keys_lock. * * - where a key is established to receive a reply message: after receiving * the (complete) reply, or during reassembly errors. Here, we clean up * the reassembly context (marking reasm_dead, to prevent another from * starting), and remove the socket from the netns & socket lists. * * - through an expiry timeout, on a per-socket timer */ struct mctp_sk_key { mctp_eid_t peer_addr; mctp_eid_t local_addr; /* MCTP_ADDR_ANY for local owned tags */ __u8 tag; /* incoming tag match; invert TO for local */ /* we hold a ref to sk when set */ struct sock *sk; /* routing lookup list */ struct hlist_node hlist; /* per-socket list */ struct hlist_node sklist; /* lock protects against concurrent updates to the reassembly and * expiry data below. */ spinlock_t lock; /* Keys are referenced during the output path, which may sleep */ refcount_t refs; /* incoming fragment reassembly context */ struct sk_buff *reasm_head; struct sk_buff **reasm_tailp; bool reasm_dead; u8 last_seq; /* key validity */ bool valid; /* expiry timeout; valid (above) cleared on expiry */ unsigned long expiry; /* free to use for device flow state tracking. Initialised to * zero on initial key creation */ unsigned long dev_flow_state; struct mctp_dev *dev; /* a tag allocated with SIOCMCTPALLOCTAG ioctl will not expire * automatically on timeout or response, instead SIOCMCTPDROPTAG * is used. */ bool manual_alloc; }; struct mctp_skb_cb { unsigned int magic; unsigned int net; int ifindex; /* extended/direct addressing if set */ mctp_eid_t src; unsigned char halen; unsigned char haddr[MAX_ADDR_LEN]; }; /* skb control-block accessors with a little extra debugging for initial * development. * * TODO: remove checks & mctp_skb_cb->magic; replace callers of __mctp_cb * with mctp_cb(). * * __mctp_cb() is only for the initial ingress code; we should see ->magic set * at all times after this. */ static inline struct mctp_skb_cb *__mctp_cb(struct sk_buff *skb) { struct mctp_skb_cb *cb = (void *)skb->cb; cb->magic = 0x4d435450; return cb; } static inline struct mctp_skb_cb *mctp_cb(struct sk_buff *skb) { struct mctp_skb_cb *cb = (void *)skb->cb; BUILD_BUG_ON(sizeof(struct mctp_skb_cb) > sizeof(skb->cb)); WARN_ON(cb->magic != 0x4d435450); return (void *)(skb->cb); } /* If CONFIG_MCTP_FLOWS, we may add one of these as a SKB extension, * indicating the flow to the device driver. */ struct mctp_flow { struct mctp_sk_key *key; }; /* Route definition. * * These are held in the pernet->mctp.routes list, with RCU protection for * removed routes. We hold a reference to the netdev; routes need to be * dropped on NETDEV_UNREGISTER events. * * Updates to the route table are performed under rtnl; all reads under RCU, * so routes cannot be referenced over a RCU grace period. Specifically: A * caller cannot block between mctp_route_lookup and mctp_route_release() */ struct mctp_route { mctp_eid_t min, max; unsigned char type; unsigned int mtu; struct mctp_dev *dev; int (*output)(struct mctp_route *route, struct sk_buff *skb); struct list_head list; refcount_t refs; struct rcu_head rcu; }; /* route interfaces */ struct mctp_route *mctp_route_lookup(struct net *net, unsigned int dnet, mctp_eid_t daddr); /* always takes ownership of skb */ int mctp_local_output(struct sock *sk, struct mctp_route *rt, struct sk_buff *skb, mctp_eid_t daddr, u8 req_tag); void mctp_key_unref(struct mctp_sk_key *key); struct mctp_sk_key *mctp_alloc_local_tag(struct mctp_sock *msk, mctp_eid_t daddr, mctp_eid_t saddr, bool manual, u8 *tagp); /* routing <--> device interface */ unsigned int mctp_default_net(struct net *net); int mctp_default_net_set(struct net *net, unsigned int index); int mctp_route_add_local(struct mctp_dev *mdev, mctp_eid_t addr); int mctp_route_remove_local(struct mctp_dev *mdev, mctp_eid_t addr); void mctp_route_remove_dev(struct mctp_dev *mdev); /* neighbour definitions */ enum mctp_neigh_source { MCTP_NEIGH_STATIC, MCTP_NEIGH_DISCOVER, }; struct mctp_neigh { struct mctp_dev *dev; mctp_eid_t eid; enum mctp_neigh_source source; unsigned char ha[MAX_ADDR_LEN]; struct list_head list; struct rcu_head rcu; }; int mctp_neigh_init(void); void mctp_neigh_exit(void); // ret_hwaddr may be NULL, otherwise must have space for MAX_ADDR_LEN int mctp_neigh_lookup(struct mctp_dev *dev, mctp_eid_t eid, void *ret_hwaddr); void mctp_neigh_remove_dev(struct mctp_dev *mdev); int mctp_routes_init(void); void mctp_routes_exit(void); int mctp_device_init(void); void mctp_device_exit(void); #endif /* __NET_MCTP_H */