Home
last modified time | relevance | path

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

12

/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 atomic_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.c91 void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_rtn_pdu() argument
116 static struct llc_sap_state_trans *llc_find_sap_trans(struct llc_sap *sap, in llc_find_sap_trans() argument
122 struct llc_sap_state *curr_state = &llc_sap_state_table[sap->state - 1]; in llc_find_sap_trans()
128 if (!next_trans[i]->ev(sap, skb)) { in llc_find_sap_trans()
144 static int llc_exec_sap_trans_actions(struct llc_sap *sap, in llc_exec_sap_trans_actions() argument
152 if ((*next_action)(sap, skb)) in llc_exec_sap_trans_actions()
166 static int llc_sap_next_state(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_next_state() argument
171 if (sap->state > LLC_NR_SAP_STATES) in llc_sap_next_state()
173 trans = llc_find_sap_trans(sap, skb); in llc_sap_next_state()
181 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_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_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_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
157 struct llc_sap *sap; in llc_rcv() local
163 void (*sap_handler)(struct llc_sap *sap, struct sk_buff *skb); in llc_rcv()
184 sap = llc_sap_find(pdu->dsap); in llc_rcv()
185 if (unlikely(!sap)) {/* unknown SAP */ in llc_rcv()
194 rcv = rcu_dereference(sap->rcv_func); in llc_rcv()
208 sap_handler(sap, skb); in llc_rcv()
210 llc_sap_put(sap); in llc_rcv()
Daf_llc.c61 static inline u16 llc_ui_next_link_no(int sap) in llc_ui_next_link_no() argument
63 return llc_ui_sap_link_no_max[sap]++; in llc_ui_next_link_no()
213 struct llc_sap *sap = llc->sap; in llc_ui_release() local
218 llc_sap_hold(sap); in llc_ui_release()
219 llc_sap_remove_socket(llc->sap, sk); in llc_ui_release()
221 llc_sap_put(sap); in llc_ui_release()
242 struct llc_sap *sap; in llc_ui_autoport() local
248 sap = llc_sap_find(i); in llc_ui_autoport()
249 if (!sap) { in llc_ui_autoport()
253 llc_sap_put(sap); in llc_ui_autoport()
[all …]
Dllc_output.c65 int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, in llc_build_and_send_ui_pkt() argument
69 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, sap->laddr.lsap, in llc_build_and_send_ui_pkt()
/net/sunrpc/
Daddr.c27 static size_t rpc_ntop6_noscopeid(const struct sockaddr *sap, in rpc_ntop6_noscopeid() argument
30 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in rpc_ntop6_noscopeid()
65 static size_t rpc_ntop6(const struct sockaddr *sap, in rpc_ntop6() argument
68 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in rpc_ntop6()
73 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
97 static size_t rpc_ntop6_noscopeid(const struct sockaddr *sap, in rpc_ntop6_noscopeid() argument
103 static size_t rpc_ntop6(const struct sockaddr *sap, in rpc_ntop6() argument
111 static int rpc_ntop4(const struct sockaddr *sap, in rpc_ntop4() argument
114 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in rpc_ntop4()
128 size_t rpc_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) in rpc_ntop() argument
[all …]
Drpcb_clnt.c476 const struct sockaddr *sap, in rpcb_register_inet4() argument
479 const struct sockaddr_in *sin = (const struct sockaddr_in *)sap; in rpcb_register_inet4()
485 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4()
507 const struct sockaddr *sap, in rpcb_register_inet6() argument
510 const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sap; in rpcb_register_inet6()
516 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet6()
681 struct sockaddr *sap = (struct sockaddr *)&addr; in rpcb_getport_async() local
716 salen = rpc_peeraddr(clnt, sap, sizeof(addr)); in rpcb_getport_async()
719 switch (sap->sa_family) { in rpcb_getport_async()
747 xprt->servername, sap, salen, in rpcb_getport_async()
[all …]
/net/sunrpc/xprtrdma/
Dtransport.c154 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument
156 struct sockaddr_in *sin = (struct sockaddr_in *)sap; in xprt_rdma_format_addresses4()
166 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument
168 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in xprt_rdma_format_addresses6()
178 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument
182 switch (sap->sa_family) { in xprt_rdma_format_addresses()
184 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses()
187 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses()
194 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses()
197 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); in xprt_rdma_format_addresses()
[all …]
/net/irda/ircomm/
Dircomm_ttp.c40 static int ircomm_ttp_data_indication(void *instance, void *sap,
42 static void ircomm_ttp_connect_confirm(void *instance, void *sap,
47 static void ircomm_ttp_connect_indication(void *instance, void *sap,
52 static void ircomm_ttp_flow_indication(void *instance, void *sap,
54 static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
198 static int ircomm_ttp_data_indication(void *instance, void *sap, in ircomm_ttp_data_indication() argument
215 static void ircomm_ttp_connect_confirm(void *instance, void *sap, in ircomm_ttp_connect_confirm() argument
254 static void ircomm_ttp_connect_indication(void *instance, void *sap, in ircomm_ttp_connect_indication() argument
313 static void ircomm_ttp_disconnect_indication(void *instance, void *sap, in ircomm_ttp_disconnect_indication() argument
338 static void ircomm_ttp_flow_indication(void *instance, void *sap, in ircomm_ttp_flow_indication() argument
Dircomm_lmp.c212 static int ircomm_lmp_data_indication(void *instance, void *sap, in ircomm_lmp_data_indication() argument
236 static void ircomm_lmp_connect_confirm(void *instance, void *sap, in ircomm_lmp_connect_confirm() argument
267 static void ircomm_lmp_connect_indication(void *instance, void *sap, in ircomm_lmp_connect_indication() argument
297 static void ircomm_lmp_disconnect_indication(void *instance, void *sap, in ircomm_lmp_disconnect_indication() argument
/net/802/
Dp8022.c31 llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap); in p8022_request()
48 proto->sap = llc_sap_open(type, func); in register_8022_client()
49 if (!proto->sap) { in register_8022_client()
59 llc_sap_put(proto->sap); in unregister_8022_client()
Dstp.c28 static struct llc_sap *sap __read_mostly;
71 sap = llc_sap_open(LLC_SAP_BSPAN, stp_pdu_rcv); in stp_proto_register()
72 if (!sap) { in stp_proto_register()
99 llc_sap_put(sap); in stp_proto_unregister()
/net/bridge/netfilter/
Debt_arp.c39 const __be32 *sap, *dap; in ebt_arp_mt() local
44 sap = skb_header_pointer(skb, sizeof(struct arphdr) + in ebt_arp_mt()
47 if (sap == NULL) in ebt_arp_mt()
55 FWINV(info->saddr != (*sap & info->smsk), EBT_ARP_SRC_IP)) in ebt_arp_mt()
61 FWINV(*dap != *sap, EBT_ARP_GRAT)) in ebt_arp_mt()
Debt_802_3.c23 if (FWINV(info->sap != hdr->llc.ui.ssap, EBT_802_3_SAP)) in ebt_802_3_mt()
25 if (FWINV(info->sap != hdr->llc.ui.dsap, EBT_802_3_SAP)) in ebt_802_3_mt()
/net/nfc/
Dllcp_core.c271 sdp->sap = LLCP_SDP_UNBOUND; in nfc_llcp_sdreq_timeout_work()
318 int sap, num_wks; in nfc_llcp_wks_sap() local
327 for (sap = 0; sap < num_wks; sap++) { in nfc_llcp_wks_sap()
328 if (wks[sap] == NULL) in nfc_llcp_wks_sap()
331 if (strncmp(wks[sap], service_name, service_name_len) == 0) in nfc_llcp_wks_sap()
332 return sap; in nfc_llcp_wks_sap()
1245 u8 dsap, ssap, *tlv, type, length, tid, sap; in nfc_llcp_recv_snl() local
1284 sap = 1; in nfc_llcp_recv_snl()
1291 sap = 0; in nfc_llcp_recv_snl()
1303 sap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_snl()
[all …]
/net/irda/irlan/
Dirlan_provider.c55 static void irlan_provider_connect_indication(void *instance, void *sap,
67 static int irlan_provider_data_indication(void *instance, void *sap, in irlan_provider_data_indication() argument
120 static void irlan_provider_connect_indication(void *instance, void *sap, in irlan_provider_connect_indication() argument
130 tsap = sap; in irlan_provider_connect_indication()
171 static void irlan_provider_disconnect_indication(void *instance, void *sap, in irlan_provider_disconnect_indication() argument
181 tsap = sap; in irlan_provider_disconnect_indication()
Dirlan_client.c57 static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
60 static int irlan_client_ctrl_data_indication(void *instance, void *sap,
62 static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
185 static int irlan_client_ctrl_data_indication(void *instance, void *sap, in irlan_client_ctrl_data_indication() argument
208 static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, in irlan_client_ctrl_disconnect_indication() argument
219 tsap = sap; in irlan_client_ctrl_disconnect_indication()
278 static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, in irlan_client_ctrl_connect_confirm() argument
/net/ethernet/
Deth.c155 const unsigned short *sap; in eth_type_trans() local
192 sap = skb_header_pointer(skb, 0, sizeof(*sap), &_service_access_point); in eth_type_trans()
193 if (sap && *sap == 0xFFFF) in eth_type_trans()
/net/irda/
Dirttp.c47 static int irttp_data_indication(void *instance, void *sap,
49 static int irttp_udata_indication(void *instance, void *sap,
51 static void irttp_disconnect_indication(void *instance, void *sap,
53 static void irttp_connect_indication(void *instance, void *sap,
56 static void irttp_connect_confirm(void *instance, void *sap,
69 static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow);
865 static int irttp_udata_indication(void *instance, void *sap, in irttp_udata_indication() argument
899 static int irttp_data_indication(void *instance, void *sap, in irttp_data_indication() argument
1011 static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) in irttp_flow_indication() argument
1184 static void irttp_connect_confirm(void *instance, void *sap, in irttp_connect_confirm() argument
[all …]
Diriap.c66 static void iriap_disconnect_indication(void *instance, void *sap,
68 static void iriap_connect_indication(void *instance, void *sap,
72 static void iriap_connect_confirm(void *instance, void *sap,
76 static int iriap_data_indication(void *instance, void *sap,
293 static void iriap_disconnect_indication(void *instance, void *sap, in iriap_disconnect_indication() argument
743 static void iriap_connect_confirm(void *instance, void *sap, in iriap_connect_confirm() argument
773 static void iriap_connect_indication(void *instance, void *sap, in iriap_connect_indication() argument
819 static int iriap_data_indication(void *instance, void *sap, in iriap_data_indication() argument

12