Lines Matching +full:sock +full:- +full:priv
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (c) 2010-2011 EIA Electronics,
4 // Copyright (c) 2017-2019 Pengutronix,
5 // Marc Kleine-Budde <[email protected]>
6 // Copyright (c) 2017-2019 Pengutronix,
13 #include <net/sock.h>
40 struct j1939_priv *priv; member
48 /* local list entry in priv
99 int j1939_local_ecu_get(struct j1939_priv *priv, name_t name, u8 sa);
100 void j1939_local_ecu_put(struct j1939_priv *priv, name_t name, u8 sa);
127 u8 j1939_name_to_addr(struct j1939_priv *priv, name_t name);
128 struct j1939_ecu *j1939_ecu_find_by_addr_locked(struct j1939_priv *priv,
130 struct j1939_ecu *j1939_ecu_get_by_addr(struct j1939_priv *priv, u8 addr);
131 struct j1939_ecu *j1939_ecu_get_by_addr_locked(struct j1939_priv *priv,
133 struct j1939_ecu *j1939_ecu_get_by_name(struct j1939_priv *priv, name_t name);
134 struct j1939_ecu *j1939_ecu_get_by_name_locked(struct j1939_priv *priv,
178 BUILD_BUG_ON(sizeof(struct j1939_sk_buff_cb) > sizeof(skb->cb)); in j1939_skb_to_cb()
180 return (struct j1939_sk_buff_cb *)skb->cb; in j1939_skb_to_cb()
183 int j1939_send_one(struct j1939_priv *priv, struct sk_buff *skb);
184 void j1939_sk_recv(struct j1939_priv *priv, struct sk_buff *skb);
185 bool j1939_sk_recv_match(struct j1939_priv *priv,
187 void j1939_sk_send_loop_abort(struct sock *sk, int err);
193 struct j1939_session *j1939_tp_send(struct j1939_priv *priv,
195 int j1939_tp_recv(struct j1939_priv *priv, struct sk_buff *skb);
196 int j1939_ac_fixup(struct j1939_priv *priv, struct sk_buff *skb);
197 void j1939_ac_recv(struct j1939_priv *priv, struct sk_buff *skb);
198 void j1939_simple_recv(struct j1939_priv *priv, struct sk_buff *skb);
201 struct j1939_ecu *j1939_ecu_create_locked(struct j1939_priv *priv, name_t name);
205 void j1939_ecu_unmap_all(struct j1939_priv *priv);
208 void j1939_netdev_stop(struct j1939_priv *priv);
210 void j1939_priv_put(struct j1939_priv *priv);
211 void j1939_priv_get(struct j1939_priv *priv);
214 void j1939_sk_netdev_event_netdown(struct j1939_priv *priv);
215 int j1939_cancel_active_session(struct j1939_priv *priv, struct sock *sk);
216 void j1939_tp_init(struct j1939_priv *priv);
219 void j1939_sock_pending_del(struct sock *sk);
231 struct j1939_priv *priv; member
235 struct sock *sk;
247 * last_cmd, last & block are protected by ->lock
268 /* total - total number of packets for this session */
270 /* last - last packet of a transfer block after which
275 /* tx - number of packets send by originator node.
281 /* rx - number of packets received */
283 /* block - amount of packets expected in one block */
285 /* dpo - ETP.CM_DPO, Data Packet Offset */
292 struct sock sk; /* must be first to skip with memset */
293 struct j1939_priv *priv; member
309 /* j1939 may emit equal PGN (!= equal CAN-id's) out of order
321 static inline struct j1939_sock *j1939_sk(const struct sock *sk) in j1939_sk()