mctp.h (8069b22d656f6e1922352bff90ab78e6fab73779) | mctp.h (63ed1aab3d40aa61aaa66819bdce9377ac7f40fa) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Management Component Transport Protocol (MCTP) 4 * 5 * Copyright (c) 2021 Code Construct 6 * Copyright (c) 2021 Google 7 */ 8 --- 112 unchanged lines hidden (view full) --- 121 * the (complete) reply, or during reassembly errors. Here, we clean up 122 * the reassembly context (marking reasm_dead, to prevent another from 123 * starting), and remove the socket from the netns & socket lists. 124 * 125 * - through an expiry timeout, on a per-socket timer 126 */ 127struct mctp_sk_key { 128 mctp_eid_t peer_addr; | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Management Component Transport Protocol (MCTP) 4 * 5 * Copyright (c) 2021 Code Construct 6 * Copyright (c) 2021 Google 7 */ 8 --- 112 unchanged lines hidden (view full) --- 121 * the (complete) reply, or during reassembly errors. Here, we clean up 122 * the reassembly context (marking reasm_dead, to prevent another from 123 * starting), and remove the socket from the netns & socket lists. 124 * 125 * - through an expiry timeout, on a per-socket timer 126 */ 127struct mctp_sk_key { 128 mctp_eid_t peer_addr; |
129 mctp_eid_t local_addr; | 129 mctp_eid_t local_addr; /* MCTP_ADDR_ANY for local owned tags */ |
130 __u8 tag; /* incoming tag match; invert TO for local */ 131 132 /* we hold a ref to sk when set */ 133 struct sock *sk; 134 135 /* routing lookup list */ 136 struct hlist_node hlist; 137 --- 20 unchanged lines hidden (view full) --- 158 /* expiry timeout; valid (above) cleared on expiry */ 159 unsigned long expiry; 160 161 /* free to use for device flow state tracking. Initialised to 162 * zero on initial key creation 163 */ 164 unsigned long dev_flow_state; 165 struct mctp_dev *dev; | 130 __u8 tag; /* incoming tag match; invert TO for local */ 131 132 /* we hold a ref to sk when set */ 133 struct sock *sk; 134 135 /* routing lookup list */ 136 struct hlist_node hlist; 137 --- 20 unchanged lines hidden (view full) --- 158 /* expiry timeout; valid (above) cleared on expiry */ 159 unsigned long expiry; 160 161 /* free to use for device flow state tracking. Initialised to 162 * zero on initial key creation 163 */ 164 unsigned long dev_flow_state; 165 struct mctp_dev *dev; |
166 167 /* a tag allocated with SIOCMCTPALLOCTAG ioctl will not expire 168 * automatically on timeout or response, instead SIOCMCTPDROPTAG 169 * is used. 170 */ 171 bool manual_alloc; |
|
166}; 167 168struct mctp_skb_cb { 169 unsigned int magic; 170 unsigned int net; 171 int ifindex; /* extended/direct addressing if set */ 172 mctp_eid_t src; 173 unsigned char halen; --- 60 unchanged lines hidden (view full) --- 234/* route interfaces */ 235struct mctp_route *mctp_route_lookup(struct net *net, unsigned int dnet, 236 mctp_eid_t daddr); 237 238int mctp_local_output(struct sock *sk, struct mctp_route *rt, 239 struct sk_buff *skb, mctp_eid_t daddr, u8 req_tag); 240 241void mctp_key_unref(struct mctp_sk_key *key); | 172}; 173 174struct mctp_skb_cb { 175 unsigned int magic; 176 unsigned int net; 177 int ifindex; /* extended/direct addressing if set */ 178 mctp_eid_t src; 179 unsigned char halen; --- 60 unchanged lines hidden (view full) --- 240/* route interfaces */ 241struct mctp_route *mctp_route_lookup(struct net *net, unsigned int dnet, 242 mctp_eid_t daddr); 243 244int mctp_local_output(struct sock *sk, struct mctp_route *rt, 245 struct sk_buff *skb, mctp_eid_t daddr, u8 req_tag); 246 247void mctp_key_unref(struct mctp_sk_key *key); |
248struct mctp_sk_key *mctp_alloc_local_tag(struct mctp_sock *msk, 249 mctp_eid_t daddr, mctp_eid_t saddr, 250 bool manual, u8 *tagp); |
|
242 243/* routing <--> device interface */ 244unsigned int mctp_default_net(struct net *net); 245int mctp_default_net_set(struct net *net, unsigned int index); 246int mctp_route_add_local(struct mctp_dev *mdev, mctp_eid_t addr); 247int mctp_route_remove_local(struct mctp_dev *mdev, mctp_eid_t addr); 248void mctp_route_remove_dev(struct mctp_dev *mdev); 249 --- 32 unchanged lines hidden --- | 251 252/* routing <--> device interface */ 253unsigned int mctp_default_net(struct net *net); 254int mctp_default_net_set(struct net *net, unsigned int index); 255int mctp_route_add_local(struct mctp_dev *mdev, mctp_eid_t addr); 256int mctp_route_remove_local(struct mctp_dev *mdev, mctp_eid_t addr); 257void mctp_route_remove_dev(struct mctp_dev *mdev); 258 --- 32 unchanged lines hidden --- |