/linux/net/llc/ |
A 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() 46 return sap; in llc_sap_alloc() 51 struct llc_sap *sap; in __llc_sap_find() local 56 sap = NULL; in __llc_sap_find() 58 return sap; in __llc_sap_find() 76 if (!sap || !llc_sap_hold_safe(sap)) in llc_sap_find() 77 sap = NULL; in llc_sap_find() 79 return sap; in llc_sap_find() 103 if (!sap) in llc_sap_open() [all …]
|
A D | llc_sap.c | 153 if ((*next_action)(sap, skb)) in llc_exec_sap_trans_actions() 188 sap->state = trans->next_state; in llc_sap_next_state() 209 llc_sap_next_state(sap, skb); in llc_sap_state_process() 236 ev->saddr.lsap = sap->laddr.lsap; in llc_build_and_send_test_pkt() 244 llc_sap_state_process(sap, skb); in llc_build_and_send_test_pkt() 270 llc_sap_state_process(sap, skb); in llc_build_and_send_xid_pkt() 292 llc_sap_state_process(sap, skb); in llc_sap_rcv() 329 if (unlikely(llc_sk(rc)->sap != sap || in llc_lookup_dgram() 399 spin_lock_bh(&sap->sk_lock); in llc_sap_mcast() 415 spin_unlock_bh(&sap->sk_lock); in llc_sap_mcast() [all …]
|
A D | llc_proc.c | 36 struct llc_sap *sap; in llc_get_sk_idx() local 41 spin_lock_bh(&sap->sk_lock); in llc_get_sk_idx() 52 spin_unlock_bh(&sap->sk_lock); in llc_get_sk_idx() 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() 102 spin_unlock_bh(&sap->sk_lock); in llc_seq_next() 104 spin_lock_bh(&sap->sk_lock); in llc_seq_next() 105 sk = laddr_hash_next(sap, -1); in llc_seq_next() 108 spin_unlock_bh(&sap->sk_lock); in llc_seq_next() [all …]
|
A D | llc_c_ac.c | 205 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_disc_cmd_p_set_x() local 230 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_dm_rsp_f_set_p() local 256 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_dm_rsp_f_set_1() local 289 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_frmr_rsp_f_set_x() local 315 struct llc_sap *sap = llc->sap; in llc_conn_ac_resend_frmr_rsp_f_set_0() local 345 struct llc_sap *sap = llc->sap; in llc_conn_ac_resend_frmr_rsp_f_set_p() local 368 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_i_cmd_p_set_1() local 386 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_i_cmd_p_set_0() local 404 struct llc_sap *sap = llc->sap; in llc_conn_ac_send_i_xxx_x_set_0() local 437 struct llc_sap *sap = llc->sap; in llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr() local [all …]
|
A D | llc_conn.c | 493 if (unlikely(llc_sk(rc)->sap != sap || in __llc_lookup_established() 552 if (unlikely(llc_sk(rc)->sap != sap || in __llc_lookup_listener() 700 llc_sap_hold(sap); in llc_sap_add_socket() 701 llc_sk(sk)->sap = sap; in llc_sap_add_socket() 703 spin_lock_bh(&sap->sk_lock); in llc_sap_add_socket() 705 sap->sk_count++; in llc_sap_add_socket() 708 spin_unlock_bh(&sap->sk_lock); in llc_sap_add_socket() 723 spin_lock_bh(&sap->sk_lock); in llc_sap_remove_socket() 726 sap->sk_count--; in llc_sap_remove_socket() 728 llc_sap_put(sap); in llc_sap_remove_socket() [all …]
|
A 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() 165 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, in llc_sap_action_send_test_r() 196 int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_xid_ind() argument 198 llc_sap_rtn_pdu(sap, skb); in llc_sap_action_xid_ind() 210 int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb) in llc_sap_action_test_ind() argument [all …]
|
A 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
|
A 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()
|
A D | af_llc.c | 215 struct llc_sap *sap = llc->sap; in llc_ui_release() local 220 llc_sap_hold(sap); in llc_ui_release() 223 llc_sap_put(sap); in llc_ui_release() 243 struct llc_sap *sap; in llc_ui_autoport() local 250 if (!sap) { in llc_ui_autoport() 254 llc_sap_put(sap); in llc_ui_autoport() 304 if (!sap) in llc_ui_autobind() 376 if (!sap) { in llc_ui_bind() 379 if (!sap) in llc_ui_bind() 408 llc_sap_put(sap); in llc_ui_bind() [all …]
|
/linux/net/sunrpc/ |
A D | addr.c | 74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6() 131 switch (sap->sa_family) { in rpc_ntop() 133 return rpc_ntop4(sap, buf, buflen); in rpc_ntop() 135 return rpc_ntop6(sap, buf, buflen); in rpc_ntop() 143 struct sockaddr *sap, const size_t salen) in rpc_pton4() argument 151 memset(sap, 0, sizeof(struct sockaddr_in)); in rpc_pton4() 200 struct sockaddr *sap, const size_t salen) in rpc_pton6() argument 245 struct sockaddr *sap, const size_t salen) in rpc_pton() argument 252 return rpc_pton4(buf, buflen, sap, salen); in rpc_pton() 271 switch (sap->sa_family) { in rpc_sockaddr2uaddr() [all …]
|
A D | rpcb_clnt.c | 460 const struct sockaddr *sap, in rpcb_register_inet4() argument 469 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4() 486 const struct sockaddr *sap, in rpcb_register_inet6() argument 495 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet6() 656 struct sockaddr *sap = (struct sockaddr *)&addr; in rpcb_getport_async() local 682 salen = rpc_peeraddr(clnt, sap, sizeof(addr)); in rpcb_getport_async() 685 switch (sap->sa_family) { in rpcb_getport_async() 708 xprt->servername, sap, salen, in rpcb_getport_async() 733 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_NOFS); in rpcb_getport_async() 916 sap, sizeof(address)) == 0) in rpcb_dec_getaddr() [all …]
|
/linux/include/net/ |
A D | llc.h | 77 return &sap->sk_dev_hash[bucket]; in llc_sk_dev_hash() 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() 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() 127 void llc_sap_close(struct llc_sap *sap); 129 static inline void llc_sap_put(struct llc_sap *sap) in llc_sap_put() argument 131 if (refcount_dec_and_test(&sap->refcnt)) in llc_sap_put() [all …]
|
A D | llc_s_ac.h | 26 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);
|
A D | llc_s_ev.h | 54 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 …]
|
A 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,
|
A D | llc_conn.h | 37 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/drivers/net/netdevsim/ |
A 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/include/linux/sunrpc/ |
A 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/fs/lockd/ |
A D | host.c | 55 const struct sockaddr *sap; /* address to search for */ member 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() 137 memcpy(nlm_addr(host), ni->sap, ni->salen); in nlm_alloc_host() 227 .sap = sap, in nlmclnt_lookup_host() 248 chain = &nlm_client_hosts[nlm_hash_address(sap)]; in nlmclnt_lookup_host() 252 if (!rpc_cmp_addr(nlm_addr(host), sap)) in nlmclnt_lookup_host() 340 .sap = svc_addr(rqstp), in nlmsvc_lookup_host() [all …]
|
/linux/include/linux/lockd/ |
A D | lockd.h | 228 struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, 256 const struct sockaddr *sap, 312 static inline int __nlm_privileged_request4(const struct sockaddr *sap) in __nlm_privileged_request4() argument 314 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in __nlm_privileged_request4() 323 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument 325 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; in __nlm_privileged_request6() 336 static inline int __nlm_privileged_request6(const struct sockaddr *sap) in __nlm_privileged_request6() argument 350 const struct sockaddr *sap = svc_addr(rqstp); in nlm_privileged_requester() local 352 switch (sap->sa_family) { in nlm_privileged_requester() 354 return __nlm_privileged_request4(sap); in nlm_privileged_requester() [all …]
|
/linux/net/sunrpc/xprtrdma/ |
A D | transport.c | 163 struct sockaddr_in *sin = (struct sockaddr_in *)sap; in xprt_rdma_format_addresses4() 189 switch (sap->sa_family) { in xprt_rdma_format_addresses() 191 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses() 194 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses() 201 (void)rpc_ntop(sap, buf, sizeof(buf)); in xprt_rdma_format_addresses() 316 struct sockaddr *sap; in xprt_setup_rdma() local 345 sap = args->dstaddr; in xprt_setup_rdma() 352 memcpy(&xprt->addr, sap, xprt->addrlen); in xprt_setup_rdma() 354 if (rpc_get_port(sap)) in xprt_setup_rdma() 356 xprt_rdma_format_addresses(xprt, sap); in xprt_setup_rdma() [all …]
|
/linux/net/802/ |
A 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()
|
A 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/net/bridge/netfilter/ |
A 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/net/nfc/ |
A D | llcp_core.c | 304 int sap, num_wks; in nfc_llcp_wks_sap() local 313 for (sap = 0; sap < num_wks; sap++) { in nfc_llcp_wks_sap() 314 if (wks[sap] == NULL) in nfc_llcp_wks_sap() 318 return sap; in nfc_llcp_wks_sap() 1273 sap = 1; in nfc_llcp_recv_snl() 1280 sap = 0; in nfc_llcp_recv_snl() 1297 sap = 0; in nfc_llcp_recv_snl() 1307 llcp_sock->ssap = sap; in nfc_llcp_recv_snl() 1310 sap = llcp_sock->ssap; in nfc_llcp_recv_snl() 1333 sdp->sap = tlv[3]; in nfc_llcp_recv_snl() [all …]
|