/linux-6.1.9/net/llc/ |
D | llc_core.c | 35 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 …]
|
D | llc_sap.c | 92 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 …]
|
D | llc_proc.c | 36 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 …]
|
D | llc_s_ac.c | 37 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 …]
|
D | llc_c_ac.c | 205 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 …]
|
D | llc_conn.c | 453 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 …]
|
D | llc_s_ev.c | 23 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
|
D | llc_input.c | 39 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()
|
D | af_llc.c | 63 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() 215 struct llc_sap *sap = llc->sap; in llc_ui_release() local 220 llc_sap_hold(sap); in llc_ui_release() 221 llc_sap_remove_socket(llc->sap, sk); in llc_ui_release() 223 llc_sap_put(sap); in llc_ui_release() 243 struct llc_sap *sap; in llc_ui_autoport() local 249 sap = llc_sap_find(i); in llc_ui_autoport() 250 if (!sap) { in llc_ui_autoport() 254 llc_sap_put(sap); in llc_ui_autoport() [all …]
|
/linux-6.1.9/net/sunrpc/ |
D | addr.c | 28 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 …]
|
/linux-6.1.9/include/net/ |
D | llc.h | 73 struct hlist_head *llc_sk_dev_hash(struct llc_sap *sap, int ifindex) in llc_sk_dev_hash() argument 77 return &sap->sk_dev_hash[bucket]; in llc_sk_dev_hash() 81 u32 llc_sk_laddr_hashfn(struct llc_sap *sap, const struct llc_addr *laddr) in llc_sk_laddr_hashfn() argument 88 struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap, in llc_sk_laddr_hash() argument 91 return &sap->sk_laddr_hash[llc_sk_laddr_hashfn(sap, laddr)]; in llc_sk_laddr_hash() 107 void (*handler)(struct llc_sap *sap, struct sk_buff *skb)); 117 static inline void llc_sap_hold(struct llc_sap *sap) in llc_sap_hold() argument 119 refcount_inc(&sap->refcnt); in llc_sap_hold() 122 static inline bool llc_sap_hold_safe(struct llc_sap *sap) in llc_sap_hold_safe() argument 124 return refcount_inc_not_zero(&sap->refcnt); in llc_sap_hold_safe() [all …]
|
D | llc_s_ac.h | 30 typedef int (*llc_sap_action_t)(struct llc_sap *sap, struct sk_buff *skb); 32 int llc_sap_action_unitdata_ind(struct llc_sap *sap, struct sk_buff *skb); 33 int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb); 34 int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb); 35 int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb); 36 int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb); 37 int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb); 38 int llc_sap_action_report_status(struct llc_sap *sap, struct sk_buff *skb); 39 int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb); 40 int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb);
|
D | llc_s_ev.h | 55 typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb); 57 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb); 58 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb); 59 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb); 60 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb); 61 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb); 62 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb); 63 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb); 64 int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb); 65 int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb); [all …]
|
D | llc_sap.h | 22 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,
|
D | llc_conn.h | 37 struct llc_sap *sap; /* pointer to parent SAP */ member 113 struct sock *llc_lookup_established(struct llc_sap *sap, struct llc_addr *daddr, 115 void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk); 116 void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk);
|
/linux-6.1.9/drivers/net/netdevsim/ |
D | ipsec.c | 37 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-6.1.9/include/linux/sunrpc/ |
D | addr.h | 23 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-6.1.9/net/802/ |
D | p8022.c | 28 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()
|
D | stp.c | 25 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-6.1.9/include/linux/lockd/ |
D | lockd.h | 228 struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, 256 const struct sockaddr *sap, 318 static inline int __nlm_privileged_request4(const struct sockaddr *sap) in __nlm_privileged_request4() argument 320 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_privileged_request4() 329 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument 331 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_privileged_request6() 342 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument 356 const struct sockaddr *sap = svc_addr(rqstp); in nlm_privileged_requester() local 358 switch (sap->sa_family) { in nlm_privileged_requester() 360 return __nlm_privileged_request4(sap); in nlm_privileged_requester() [all …]
|
/linux-6.1.9/fs/lockd/ |
D | host.c | 55 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-6.1.9/net/sunrpc/xprtrdma/ |
D | transport.c | 157 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument 159 struct sockaddr_in *sin = (struct sockaddr_in *)sap; in xprt_rdma_format_addresses4() 169 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument 171 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in xprt_rdma_format_addresses6() 181 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument 185 switch (sap->sa_family) { in xprt_rdma_format_addresses() 187 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses() 190 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses() 197 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses() 200 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); in xprt_rdma_format_addresses() [all …]
|
/linux-6.1.9/net/bridge/netfilter/ |
D | ebt_arp.c | 40 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-6.1.9/net/nfc/ |
D | llcp_core.c | 258 sdp->sap = LLCP_SDP_UNBOUND; in nfc_llcp_sdreq_timeout_work() 305 int sap, num_wks; in nfc_llcp_wks_sap() local 314 for (sap = 0; sap < num_wks; sap++) { in nfc_llcp_wks_sap() 315 if (wks[sap] == NULL) in nfc_llcp_wks_sap() 318 if (strncmp(wks[sap], service_name, service_name_len) == 0) in nfc_llcp_wks_sap() 319 return sap; in nfc_llcp_wks_sap() 1227 u8 dsap, ssap, type, length, tid, sap; in nfc_llcp_recv_snl() local 1267 sap = 1; in nfc_llcp_recv_snl() 1274 sap = 0; in nfc_llcp_recv_snl() 1286 sap = nfc_llcp_reserve_sdp_ssap(local); in nfc_llcp_recv_snl() [all …]
|
/linux-6.1.9/fs/nfs/ |
D | nfs4namespace.c | 488 struct sockaddr_storage *sap; in nfs4_try_replacing_one_location() local 493 sap = kmalloc(sizeof(*sap), GFP_KERNEL); in nfs4_try_replacing_one_location() 494 if (sap == NULL) in nfs4_try_replacing_one_location() 509 sap, sizeof(*sap), net, 0); in nfs4_try_replacing_one_location() 512 rpc_set_port((struct sockaddr *)sap, NFS_PORT); in nfs4_try_replacing_one_location() 519 error = nfs4_update_server(server, hostname, sap, salen, net); in nfs4_try_replacing_one_location() 525 kfree(sap); in nfs4_try_replacing_one_location()
|