Home
last modified time | relevance | path

Searched refs:sap (Results 1 – 25 of 67) sorted by relevance

123

/Linux-v5.10/net/llc/
Dllc_core.c35 struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC); in llc_sap_alloc() local
38 if (sap) { in llc_sap_alloc()
40 sap->state = LLC_SAP_STATE_ACTIVE; in llc_sap_alloc()
41 spin_lock_init(&sap->sk_lock); in llc_sap_alloc()
43 INIT_HLIST_NULLS_HEAD(&sap->sk_laddr_hash[i], i); in llc_sap_alloc()
44 refcount_set(&sap->refcnt, 1); in llc_sap_alloc()
46 return sap; in llc_sap_alloc()
51 struct llc_sap *sap; in __llc_sap_find() local
53 list_for_each_entry(sap, &llc_sap_list, node) in __llc_sap_find()
54 if (sap->laddr.lsap == sap_value) in __llc_sap_find()
[all …]
Dllc_sap.c92 void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_rtn_pdu() argument
117 static struct llc_sap_state_trans *llc_find_sap_trans(struct llc_sap *sap, in llc_find_sap_trans() argument
123 struct llc_sap_state *curr_state = &llc_sap_state_table[sap->state - 1]; in llc_find_sap_trans()
129 if (!next_trans[i]->ev(sap, skb)) { in llc_find_sap_trans()
145 static int llc_exec_sap_trans_actions(struct llc_sap *sap, in llc_exec_sap_trans_actions() argument
153 if ((*next_action)(sap, skb)) in llc_exec_sap_trans_actions()
167 static int llc_sap_next_state(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_next_state() argument
172 if (sap->state > LLC_NR_SAP_STATES) in llc_sap_next_state()
174 trans = llc_find_sap_trans(sap, skb); in llc_sap_next_state()
182 rc = llc_exec_sap_trans_actions(sap, trans, skb); in llc_sap_next_state()
[all …]
Dllc_proc.c36 struct llc_sap *sap; in llc_get_sk_idx() local
40 list_for_each_entry_rcu(sap, &llc_sap_list, node) { in llc_get_sk_idx()
41 spin_lock_bh(&sap->sk_lock); in llc_get_sk_idx()
43 struct hlist_nulls_head *head = &sap->sk_laddr_hash[i]; in llc_get_sk_idx()
52 spin_unlock_bh(&sap->sk_lock); in llc_get_sk_idx()
67 static struct sock *laddr_hash_next(struct llc_sap *sap, int bucket) in laddr_hash_next() argument
73 sk_nulls_for_each(sk, node, &sap->sk_laddr_hash[bucket]) in laddr_hash_next()
84 struct llc_sap *sap; in llc_seq_next() local
98 sap = llc->sap; in llc_seq_next()
99 sk = laddr_hash_next(sap, llc_sk_laddr_hashfn(sap, &llc->laddr)); in llc_seq_next()
[all …]
Dllc_s_ac.c37 int llc_sap_action_unitdata_ind(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_unitdata_ind() argument
39 llc_sap_rtn_pdu(sap, skb); in llc_sap_action_unitdata_ind()
52 int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_send_ui() argument
77 int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_send_xid_c() argument
101 int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_send_xid_r() argument
114 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, in llc_sap_action_send_xid_r()
133 int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_send_test_c() argument
149 int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_send_test_r() argument
165 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, in llc_sap_action_send_test_r()
183 int llc_sap_action_report_status(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_report_status() argument
[all …]
Dllc_c_ac.c205 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_disc_cmd_p_set_x() local
207 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_disc_cmd_p_set_x()
230 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_dm_rsp_f_set_p() local
234 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_dm_rsp_f_set_p()
256 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_dm_rsp_f_set_1() local
258 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_dm_rsp_f_set_1()
289 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_frmr_rsp_f_set_x() local
291 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_send_frmr_rsp_f_set_x()
315 struct llc_sap *sap = llc->sap; in llc_conn_ac_resend_frmr_rsp_f_set_0() local
318 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_conn_ac_resend_frmr_rsp_f_set_0()
[all …]
Dllc_conn.c453 static inline bool llc_estab_match(const struct llc_sap *sap, in llc_estab_match() argument
477 static struct sock *__llc_lookup_established(struct llc_sap *sap, in __llc_lookup_established() argument
483 int slot = llc_sk_laddr_hashfn(sap, laddr); in __llc_lookup_established()
484 struct hlist_nulls_head *laddr_hb = &sap->sk_laddr_hash[slot]; in __llc_lookup_established()
489 if (llc_estab_match(sap, daddr, laddr, rc)) { in __llc_lookup_established()
493 if (unlikely(llc_sk(rc)->sap != sap || in __llc_lookup_established()
494 !llc_estab_match(sap, daddr, laddr, rc))) { in __llc_lookup_established()
514 struct sock *llc_lookup_established(struct llc_sap *sap, in llc_lookup_established() argument
521 sk = __llc_lookup_established(sap, daddr, laddr); in llc_lookup_established()
526 static inline bool llc_listener_match(const struct llc_sap *sap, in llc_listener_match() argument
[all …]
Dllc_s_ev.c23 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_activation_req() argument
31 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_rx_ui() argument
41 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_unitdata_req() argument
51 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_xid_req() argument
60 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_rx_xid_c() argument
70 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_rx_xid_r() argument
80 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_test_req() argument
89 int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_rx_test_c() argument
99 int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_rx_test_r() argument
109 int llc_sap_ev_deactivation_req(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_ev_deactivation_req() argument
Dllc_input.c39 static void (*llc_type_handlers[2])(struct llc_sap *sap,
42 void llc_add_pack(int type, void (*handler)(struct llc_sap *sap, in llc_add_pack() argument
158 struct llc_sap *sap; in llc_rcv() local
164 void (*sap_handler)(struct llc_sap *sap, struct sk_buff *skb); in llc_rcv()
185 sap = llc_sap_find(pdu->dsap); in llc_rcv()
186 if (unlikely(!sap)) {/* unknown SAP */ in llc_rcv()
195 rcv = rcu_dereference(sap->rcv_func); in llc_rcv()
209 sap_handler(sap, skb); in llc_rcv()
211 llc_sap_put(sap); in llc_rcv()
Daf_llc.c63 static inline u16 llc_ui_next_link_no(int sap) in llc_ui_next_link_no() argument
65 return llc_ui_sap_link_no_max[sap]++; in llc_ui_next_link_no()
207 struct llc_sap *sap = llc->sap; in llc_ui_release() local
212 llc_sap_hold(sap); in llc_ui_release()
213 llc_sap_remove_socket(llc->sap, sk); in llc_ui_release()
215 llc_sap_put(sap); in llc_ui_release()
236 struct llc_sap *sap; in llc_ui_autoport() local
242 sap = llc_sap_find(i); in llc_ui_autoport()
243 if (!sap) { in llc_ui_autoport()
247 llc_sap_put(sap); in llc_ui_autoport()
[all …]
/Linux-v5.10/net/sunrpc/
Daddr.c28 static size_t rpc_ntop6_noscopeid(const struct sockaddr *sap, in rpc_ntop6_noscopeid() argument
31 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in rpc_ntop6_noscopeid()
66 static size_t rpc_ntop6(const struct sockaddr *sap, in rpc_ntop6() argument
69 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in rpc_ntop6()
74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
98 static size_t rpc_ntop6_noscopeid(const struct sockaddr *sap, in rpc_ntop6_noscopeid() argument
104 static size_t rpc_ntop6(const struct sockaddr *sap, in rpc_ntop6() argument
112 static int rpc_ntop4(const struct sockaddr *sap, in rpc_ntop4() argument
115 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in rpc_ntop4()
129 size_t rpc_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) in rpc_ntop() argument
[all …]
Drpcb_clnt.c458 const struct sockaddr *sap, in rpcb_register_inet4() argument
461 const struct sockaddr_in *sin = (const struct sockaddr_in *)sap; in rpcb_register_inet4()
467 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4()
484 const struct sockaddr *sap, in rpcb_register_inet6() argument
487 const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sap; in rpcb_register_inet6()
493 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet6()
654 struct sockaddr *sap = (struct sockaddr *)&addr; in rpcb_getport_async() local
680 salen = rpc_peeraddr(clnt, sap, sizeof(addr)); in rpcb_getport_async()
683 switch (sap->sa_family) { in rpcb_getport_async()
706 xprt->servername, sap, salen, in rpcb_getport_async()
[all …]
/Linux-v5.10/include/net/
Dllc.h73 struct hlist_head *llc_sk_dev_hash(struct llc_sap *sap, int ifindex) in llc_sk_dev_hash() argument
75 return &sap->sk_dev_hash[ifindex % LLC_SK_DEV_HASH_ENTRIES]; in llc_sk_dev_hash()
79 u32 llc_sk_laddr_hashfn(struct llc_sap *sap, const struct llc_addr *laddr) in llc_sk_laddr_hashfn() argument
86 struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap, in llc_sk_laddr_hash() argument
89 return &sap->sk_laddr_hash[llc_sk_laddr_hashfn(sap, laddr)]; in llc_sk_laddr_hash()
105 void (*handler)(struct llc_sap *sap, struct sk_buff *skb));
115 static inline void llc_sap_hold(struct llc_sap *sap) in llc_sap_hold() argument
117 refcount_inc(&sap->refcnt); in llc_sap_hold()
120 static inline bool llc_sap_hold_safe(struct llc_sap *sap) in llc_sap_hold_safe() argument
122 return refcount_inc_not_zero(&sap->refcnt); in llc_sap_hold_safe()
[all …]
Dllc_s_ac.h26 typedef int (*llc_sap_action_t)(struct llc_sap *sap, struct sk_buff *skb);
28 int llc_sap_action_unitdata_ind(struct llc_sap *sap, struct sk_buff *skb);
29 int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb);
30 int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb);
31 int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb);
32 int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb);
33 int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb);
34 int llc_sap_action_report_status(struct llc_sap *sap, struct sk_buff *skb);
35 int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb);
36 int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb);
Dllc_s_ev.h54 typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
56 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
57 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
58 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
59 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
60 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
61 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
62 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
63 int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb);
64 int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb);
[all …]
Dllc_sap.h22 void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb);
28 void llc_build_and_send_test_pkt(struct llc_sap *sap, struct sk_buff *skb,
30 void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb,
Dllc_conn.h37 struct llc_sap *sap; /* pointer to parent SAP */ member
112 struct sock *llc_lookup_established(struct llc_sap *sap, struct llc_addr *daddr,
114 void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk);
115 void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);
/Linux-v5.10/drivers/net/netdevsim/
Dipsec.c37 struct nsim_sa *sap = &ipsec->sa[i]; in nsim_dbg_netdev_ops_read() local
39 if (!sap->used) in nsim_dbg_netdev_ops_read()
44 i, (sap->rx ? 'r' : 't'), sap->ipaddr[0], in nsim_dbg_netdev_ops_read()
45 sap->ipaddr[1], sap->ipaddr[2], sap->ipaddr[3]); in nsim_dbg_netdev_ops_read()
48 i, be32_to_cpu(sap->xs->id.spi), in nsim_dbg_netdev_ops_read()
49 sap->xs->id.proto, sap->salt, sap->crypt); in nsim_dbg_netdev_ops_read()
52 i, sap->key[0], sap->key[1], in nsim_dbg_netdev_ops_read()
53 sap->key[2], sap->key[3]); in nsim_dbg_netdev_ops_read()
/Linux-v5.10/include/linux/sunrpc/
Daddr.h23 static inline unsigned short rpc_get_port(const struct sockaddr *sap) in rpc_get_port() argument
25 switch (sap->sa_family) { in rpc_get_port()
27 return ntohs(((struct sockaddr_in *)sap)->sin_port); in rpc_get_port()
29 return ntohs(((struct sockaddr_in6 *)sap)->sin6_port); in rpc_get_port()
34 static inline void rpc_set_port(struct sockaddr *sap, in rpc_set_port() argument
37 switch (sap->sa_family) { in rpc_set_port()
39 ((struct sockaddr_in *)sap)->sin_port = htons(port); in rpc_set_port()
42 ((struct sockaddr_in6 *)sap)->sin6_port = htons(port); in rpc_set_port()
/Linux-v5.10/net/802/
Dp8022.c28 llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap); in p8022_request()
45 proto->sap = llc_sap_open(type, func); in register_8022_client()
46 if (!proto->sap) { in register_8022_client()
56 llc_sap_put(proto->sap); in unregister_8022_client()
Dstp.c25 static struct llc_sap *sap __read_mostly;
68 sap = llc_sap_open(LLC_SAP_BSPAN, stp_pdu_rcv); in stp_proto_register()
69 if (!sap) { in stp_proto_register()
96 llc_sap_put(sap); in stp_proto_unregister()
/Linux-v5.10/include/linux/lockd/
Dlockd.h225 struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap,
253 const struct sockaddr *sap,
307 static inline int __nlm_privileged_request4(const struct sockaddr *sap) in __nlm_privileged_request4() argument
309 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_privileged_request4()
318 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument
320 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_privileged_request6()
331 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument
345 const struct sockaddr *sap = svc_addr(rqstp); in nlm_privileged_requester() local
347 switch (sap->sa_family) { in nlm_privileged_requester()
349 return __nlm_privileged_request4(sap); in nlm_privileged_requester()
[all …]
/Linux-v5.10/fs/lockd/
Dhost.c55 const struct sockaddr *sap; /* address to search for */ member
75 static unsigned int __nlm_hash_addr4(const struct sockaddr *sap) in __nlm_hash_addr4() argument
77 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_hash_addr4()
81 static unsigned int __nlm_hash_addr6(const struct sockaddr *sap) in __nlm_hash_addr6() argument
83 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_hash_addr6()
91 static unsigned int nlm_hash_address(const struct sockaddr *sap) in nlm_hash_address() argument
95 switch (sap->sa_family) { in nlm_hash_address()
97 hash = __nlm_hash_addr4(sap); in nlm_hash_address()
100 hash = __nlm_hash_addr6(sap); in nlm_hash_address()
121 nsm = nsm_get_handle(ni->net, ni->sap, ni->salen, in nlm_alloc_host()
[all …]
/Linux-v5.10/net/sunrpc/xprtrdma/
Dtransport.c160 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument
162 struct sockaddr_in *sin = (struct sockaddr_in *)sap; in xprt_rdma_format_addresses4()
172 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument
174 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in xprt_rdma_format_addresses6()
184 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument
188 switch (sap->sa_family) { in xprt_rdma_format_addresses()
190 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses()
193 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses()
200 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses()
203 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); in xprt_rdma_format_addresses()
[all …]
/Linux-v5.10/net/bridge/netfilter/
Debt_arp.c40 const __be32 *sap, *dap; in ebt_arp_mt() local
45 sap = skb_header_pointer(skb, sizeof(struct arphdr) + in ebt_arp_mt()
48 if (sap == NULL) in ebt_arp_mt()
57 info->saddr != (*sap & info->smsk))) in ebt_arp_mt()
64 NF_INVF(info, EBT_ARP_GRAT, *dap != *sap)) in ebt_arp_mt()
/Linux-v5.10/net/nfc/
Dllcp_core.c259 sdp->sap = LLCP_SDP_UNBOUND; in nfc_llcp_sdreq_timeout_work()
306 int sap, num_wks; in nfc_llcp_wks_sap() local
315 for (sap = 0; sap < num_wks; sap++) { in nfc_llcp_wks_sap()
316 if (wks[sap] == NULL) in nfc_llcp_wks_sap()
319 if (strncmp(wks[sap], service_name, service_name_len) == 0) in nfc_llcp_wks_sap()
320 return sap; in nfc_llcp_wks_sap()
1232 u8 dsap, ssap, *tlv, type, length, tid, sap; in nfc_llcp_recv_snl() local
1271 sap = 1; in nfc_llcp_recv_snl()
1278 sap = 0; in nfc_llcp_recv_snl()
1290 sap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_snl()
[all …]

123