/net/802/ |
D | psnap.c | 31 struct datalink_proto *proto = NULL, *p; in find_snap_client() local 35 proto = p; in find_snap_client() 39 return proto; in find_snap_client() 49 struct datalink_proto *proto; in snap_rcv() local 58 proto = find_snap_client(skb_transport_header(skb)); in snap_rcv() 59 if (proto) { in snap_rcv() 63 rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); in snap_rcv() 67 if (unlikely(!proto)) in snap_rcv() 128 struct datalink_proto *proto = NULL; in register_snap_client() local 135 proto = kmalloc(sizeof(*proto), GFP_ATOMIC); in register_snap_client() [all …]
|
D | p8022.c | 38 struct datalink_proto *proto; in register_8022_client() local 40 proto = kmalloc(sizeof(*proto), GFP_ATOMIC); in register_8022_client() 41 if (proto) { in register_8022_client() 42 proto->type[0] = type; in register_8022_client() 43 proto->header_length = 3; in register_8022_client() 44 proto->request = p8022_request; in register_8022_client() 45 proto->sap = llc_sap_open(type, func); in register_8022_client() 46 if (!proto->sap) { in register_8022_client() 47 kfree(proto); in register_8022_client() 48 proto = NULL; in register_8022_client() [all …]
|
D | stp.c | 35 const struct stp_proto *proto; in stp_pdu_rcv() local 43 proto = rcu_dereference(garp_protos[eh->h_dest[5] - in stp_pdu_rcv() 45 if (proto && in stp_pdu_rcv() 46 !ether_addr_equal(eh->h_dest, proto->group_address)) in stp_pdu_rcv() 49 proto = rcu_dereference(stp_proto); in stp_pdu_rcv() 51 if (!proto) in stp_pdu_rcv() 54 proto->rcv(proto, skb, dev); in stp_pdu_rcv() 62 int stp_proto_register(const struct stp_proto *proto) in stp_proto_register() argument 74 if (is_zero_ether_addr(proto->group_address)) in stp_proto_register() 75 rcu_assign_pointer(stp_proto, proto); in stp_proto_register() [all …]
|
D | p8023.c | 40 struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC); in make_8023_client() local 42 if (proto) { in make_8023_client() 43 proto->header_length = 0; in make_8023_client() 44 proto->request = p8023_request; in make_8023_client() 46 return proto; in make_8023_client()
|
/net/8021q/ |
D | vlan_core.c | 163 __be16 proto; member 168 static bool vlan_hw_filter_capable(const struct net_device *dev, __be16 proto) in vlan_hw_filter_capable() argument 170 if (proto == htons(ETH_P_8021Q) && in vlan_hw_filter_capable() 173 if (proto == htons(ETH_P_8021AD) && in vlan_hw_filter_capable() 180 __be16 proto, u16 vid) in vlan_vid_info_get() argument 185 if (vid_info->proto == proto && vid_info->vid == vid) in vlan_vid_info_get() 191 static struct vlan_vid_info *vlan_vid_info_alloc(__be16 proto, u16 vid) in vlan_vid_info_alloc() argument 198 vid_info->proto = proto; in vlan_vid_info_alloc() 204 static int vlan_add_rx_filter_info(struct net_device *dev, __be16 proto, u16 vid) in vlan_add_rx_filter_info() argument 206 if (!vlan_hw_filter_capable(dev, proto)) in vlan_add_rx_filter_info() [all …]
|
/net/netfilter/ |
D | nf_conntrack_proto_tcp.c | 279 seq_printf(s, "%s ", tcp_conntrack_names[ct->proto.tcp.state]); in tcp_print_conntrack() 772 const struct ip_ct_tcp_state *sender = &ct->proto.tcp.seen[0]; in tcp_new() 773 const struct ip_ct_tcp_state *receiver = &ct->proto.tcp.seen[1]; in tcp_new() 785 memset(&ct->proto.tcp, 0, sizeof(ct->proto.tcp)); in tcp_new() 787 ct->proto.tcp.seen[0].td_end = in tcp_new() 790 ct->proto.tcp.seen[0].td_maxwin = ntohs(th->window); in tcp_new() 791 if (ct->proto.tcp.seen[0].td_maxwin == 0) in tcp_new() 792 ct->proto.tcp.seen[0].td_maxwin = 1; in tcp_new() 793 ct->proto.tcp.seen[0].td_maxend = in tcp_new() 794 ct->proto.tcp.seen[0].td_end; in tcp_new() [all …]
|
D | nf_conntrack_proto_sctp.c | 141 seq_printf(s, "%s ", sctp_conntrack_names[ct->proto.sctp.state]); in sctp_print_conntrack() 269 memset(&ct->proto.sctp, 0, sizeof(ct->proto.sctp)); in sctp_new() 297 ct->proto.sctp.vtag[IP_CT_DIR_REPLY] = ih->init_tag; in sctp_new() 301 ct->proto.sctp.vtag[IP_CT_DIR_ORIGINAL] = sh->vtag; in sctp_new() 307 ct->proto.sctp.vtag[IP_CT_DIR_REPLY] = sh->vtag; in sctp_new() 310 ct->proto.sctp.state = SCTP_CONNTRACK_NONE; in sctp_new() 394 sh->vtag != ct->proto.sctp.vtag[dir]) { in nf_conntrack_sctp_packet() 412 sh->vtag != ct->proto.sctp.vtag[dir]) || in nf_conntrack_sctp_packet() 414 sh->vtag != ct->proto.sctp.vtag[!dir])) in nf_conntrack_sctp_packet() 421 sh->vtag != ct->proto.sctp.vtag[dir]) || in nf_conntrack_sctp_packet() [all …]
|
D | nf_conntrack_proto_dccp.c | 408 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT; in dccp_new() 409 ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER; in dccp_new() 410 ct->proto.dccp.state = CT_DCCP_NONE; in dccp_new() 411 ct->proto.dccp.last_pkt = DCCP_PKT_REQUEST; in dccp_new() 412 ct->proto.dccp.last_dir = IP_CT_DIR_ORIGINAL; in dccp_new() 413 ct->proto.dccp.handshake_seq = 0; in dccp_new() 549 role = ct->proto.dccp.role[dir]; in nf_conntrack_dccp_packet() 550 old_state = ct->proto.dccp.state; in nf_conntrack_dccp_packet() 559 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_CLIENT; in nf_conntrack_dccp_packet() 560 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_SERVER; in nf_conntrack_dccp_packet() [all …]
|
D | xt_multiport.c | 109 check(u_int16_t proto, in check() argument 115 return (proto == IPPROTO_TCP || proto == IPPROTO_UDP in check() 116 || proto == IPPROTO_UDPLITE in check() 117 || proto == IPPROTO_SCTP || proto == IPPROTO_DCCP) in check() 130 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt_check() 139 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt6_check()
|
/net/ipv4/ |
D | gre_demux.c | 31 int gre_add_protocol(const struct gre_protocol *proto, u8 version) in gre_add_protocol() argument 36 return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? in gre_add_protocol() 41 int gre_del_protocol(const struct gre_protocol *proto, u8 version) in gre_del_protocol() argument 48 ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? in gre_del_protocol() 63 bool *csum_err, __be16 proto, int nhs) in gre_parse_header() argument 83 tpi->proto = greh->protocol; in gre_parse_header() 114 if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) { in gre_parse_header() 121 tpi->proto = proto; in gre_parse_header() 148 const struct gre_protocol *proto; in gre_rcv() local 160 proto = rcu_dereference(gre_proto[ver]); in gre_rcv() [all …]
|
D | esp4_offload.c | 97 int proto = iph->protocol; in esp4_gso_encap() local 106 xo->proto = proto; in esp4_gso_encap() 126 ops = rcu_dereference(inet_offloads[xo->proto]); in xfrm4_transport_gso_segment() 140 u8 proto = xo->proto; in xfrm4_beet_gso_segment() local 145 if (proto == IPPROTO_BEETPH) { in xfrm4_beet_gso_segment() 150 proto = ph->nexthdr; in xfrm4_beet_gso_segment() 158 ipv6_skip_exthdr(skb, 0, &proto, &frag); in xfrm4_beet_gso_segment() 159 if (proto == IPPROTO_TCP) in xfrm4_beet_gso_segment() 163 if (proto == IPPROTO_IPV6) in xfrm4_beet_gso_segment() 167 ops = rcu_dereference(inet_offloads[proto]); in xfrm4_beet_gso_segment() [all …]
|
D | udp_bpf.c | 14 static struct proto *udpv6_prot_saved __read_mostly; 16 static struct proto udp_bpf_prots[UDP_BPF_NUM_PROTS]; 18 static void udp_bpf_rebuild_protos(struct proto *prot, const struct proto *base) in udp_bpf_rebuild_protos() 25 static void udp_bpf_check_v6_needs_rebuild(struct proto *ops) in udp_bpf_check_v6_needs_rebuild() 44 struct proto *udp_bpf_get_proto(struct sock *sk, struct sk_psock *psock) in udp_bpf_get_proto()
|
/net/nfc/ |
D | af_nfc.c | 18 static int nfc_sock_create(struct net *net, struct socket *sock, int proto, in nfc_sock_create() argument 26 if (proto < 0 || proto >= NFC_SOCKPROTO_MAX) in nfc_sock_create() 30 if (proto_tab[proto] && try_module_get(proto_tab[proto]->owner)) { in nfc_sock_create() 31 rc = proto_tab[proto]->create(net, sock, proto_tab[proto], kern); in nfc_sock_create() 32 module_put(proto_tab[proto]->owner); in nfc_sock_create() 52 rc = proto_register(nfc_proto->proto, 0); in nfc_proto_register() 64 proto_unregister(nfc_proto->proto); in nfc_proto_register() 76 proto_unregister(nfc_proto->proto); in nfc_proto_unregister()
|
/net/ipv6/ |
D | ip6_offload.c | 38 static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) in ipv6_gso_pull_exthdrs() argument 46 if (proto != NEXTHDR_HOP) { in ipv6_gso_pull_exthdrs() 47 ops = rcu_dereference(inet6_offloads[proto]); in ipv6_gso_pull_exthdrs() 66 proto = opth->nexthdr; in ipv6_gso_pull_exthdrs() 70 return proto; in ipv6_gso_pull_exthdrs() 79 int proto; in ipv6_gso_segment() local 102 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); in ipv6_gso_segment() 106 udpfrag = proto == IPPROTO_UDP && encap && in ipv6_gso_segment() 109 udpfrag = proto == IPPROTO_UDP && !skb->encapsulation && in ipv6_gso_segment() 112 ops = rcu_dereference(inet6_offloads[proto]); in ipv6_gso_segment() [all …]
|
D | esp6_offload.c | 124 u8 proto = iph->nexthdr; in esp6_gso_encap() local 131 ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &proto, &frag); in esp6_gso_encap() 140 xo->proto = proto; in esp6_gso_encap() 160 ops = rcu_dereference(inet6_offloads[xo->proto]); in xfrm6_transport_gso_segment() 174 u8 proto = xo->proto; in xfrm6_beet_gso_segment() local 182 if (proto == IPPROTO_BEETPH) { in xfrm6_beet_gso_segment() 187 proto = ph->nexthdr; in xfrm6_beet_gso_segment() 192 if (proto == IPPROTO_TCP) in xfrm6_beet_gso_segment() 198 ipv6_skip_exthdr(skb, 0, &proto, &frag); in xfrm6_beet_gso_segment() 201 if (proto == IPPROTO_IPIP) in xfrm6_beet_gso_segment() [all …]
|
/net/bluetooth/ |
D | af_bluetooth.c | 69 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument 75 bt_slock_key_strings[proto], &bt_slock_key[proto], in bt_sock_reclassify_lock() 76 bt_key_strings[proto], &bt_lock_key[proto]); in bt_sock_reclassify_lock() 80 int bt_sock_register(int proto, const struct net_proto_family *ops) in bt_sock_register() argument 84 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_register() 89 if (bt_proto[proto]) in bt_sock_register() 92 bt_proto[proto] = ops; in bt_sock_register() 100 void bt_sock_unregister(int proto) in bt_sock_unregister() argument 102 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_unregister() 106 bt_proto[proto] = NULL; in bt_sock_unregister() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_hash_ipport.c | 44 u8 proto; member 57 ip1->proto == ip2->proto; in hash_ipport4_data_equal() 66 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto)) in hash_ipport4_data_list() 96 &e.port, &e.proto)) in hash_ipport4_kadt() 134 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipport4_uadt() 135 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipport4_uadt() 137 if (e.proto == 0) in hash_ipport4_uadt() 143 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipport4_uadt() 203 u8 proto; member 216 ip1->proto == ip2->proto; in hash_ipport6_data_equal() [all …]
|
D | ip_set_hash_ipportip.c | 45 u8 proto; member 57 ip1->proto == ip2->proto; in hash_ipportip4_data_equal() 67 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto)) in hash_ipportip4_data_list() 98 &e.port, &e.proto)) in hash_ipportip4_kadt() 141 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportip4_uadt() 142 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipportip4_uadt() 144 if (e.proto == 0) in hash_ipportip4_uadt() 150 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipportip4_uadt() 211 u8 proto; member 225 ip1->proto == ip2->proto; in hash_ipportip6_data_equal() [all …]
|
D | ip_set_hash_netport.c | 53 u8 proto; member 67 ip1->proto == ip2->proto && in hash_netport4_data_equal() 105 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_netport4_data_list() 143 &e.port, &e.proto)) in hash_netport4_kadt() 192 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_netport4_uadt() 193 with_ports = ip_set_proto_with_ports(e.proto); in hash_netport4_uadt() 195 if (e.proto == 0) in hash_netport4_uadt() 201 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_netport4_uadt() 270 u8 proto; member 284 ip1->proto == ip2->proto && in hash_netport6_data_equal() [all …]
|
D | ip_set_getport.c | 26 bool src, __be16 *port, u8 *proto) in get_port() argument 92 *proto = protocol; in get_port() 99 __be16 *port, u8 *proto) in ip_set_get_ip4_port() argument 122 *proto = protocol; in ip_set_get_ip4_port() 126 return get_port(skb, protocol, protooff, src, port, proto); in ip_set_get_ip4_port() 133 __be16 *port, u8 *proto) in ip_set_get_ip6_port() argument 147 return get_port(skb, nexthdr, protoff, src, port, proto); in ip_set_get_ip6_port()
|
D | ip_set_hash_ipportnet.c | 57 u8 proto; member 71 ip1->proto == ip2->proto; in hash_ipportnet4_data_equal() 109 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_ipportnet4_data_list() 148 &e.port, &e.proto)) in hash_ipportnet4_kadt() 203 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportnet4_uadt() 204 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipportnet4_uadt() 206 if (e.proto == 0) in hash_ipportnet4_uadt() 212 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipportnet4_uadt() 312 u8 proto; member 326 ip1->proto == ip2->proto; in hash_ipportnet6_data_equal() [all …]
|
D | ip_set_hash_netportnet.c | 55 u8 proto; member 68 ip1->proto == ip2->proto; in hash_netportnet4_data_equal() 120 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_netportnet4_data_list() 165 &e.port, &e.proto)) in hash_netportnet4_kadt() 236 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_netportnet4_uadt() 237 with_ports = ip_set_proto_with_ports(e.proto); in hash_netportnet4_uadt() 239 if (e.proto == 0) in hash_netportnet4_uadt() 245 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_netportnet4_uadt() 346 u8 proto; member 360 ip1->proto == ip2->proto; in hash_netportnet6_data_equal() [all …]
|
/net/xfrm/ |
D | xfrm_state.c | 76 __be32 spi, u8 proto, unsigned short family) in xfrm_spi_hash() argument 78 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash() 105 x->id.proto, x->props.family, in xfrm_hash_transfer() 194 switch (type->proto) { in xfrm_register_type() 239 switch (type->proto) { in xfrm_unregister_type() 270 static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) in xfrm_get_type() argument 281 switch (proto) { in xfrm_get_type() 313 request_module("xfrm-type-%d-%d", family, proto); in xfrm_get_type() 335 switch (type->proto) { in xfrm_register_type_offload() 359 switch (type->proto) { in xfrm_unregister_type_offload() [all …]
|
/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 20 u8 proto; in nf_reject_ip6_tcphdr_get() local 24 proto = oip6h->nexthdr; in nf_reject_ip6_tcphdr_get() 26 &proto, &frag_off); in nf_reject_ip6_tcphdr_get() 36 if (proto != IPPROTO_TCP || *otcplen < sizeof(struct tcphdr)) { in nf_reject_ip6_tcphdr_get() 38 proto, *otcplen); in nf_reject_ip6_tcphdr_get() 246 u8 proto; in reject6_csum_ok() local 251 proto = ip6h->nexthdr; in reject6_csum_ok() 252 thoff = ipv6_skip_exthdr(skb, ((u8 *)(ip6h + 1) - skb->data), &proto, &fo); in reject6_csum_ok() 257 if (!nf_reject_verify_csum(proto)) in reject6_csum_ok() 260 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in reject6_csum_ok()
|
/net/rxrpc/ |
D | conn_service.c | 51 if (conn->proto.index_key < k.index_key) in rxrpc_find_service_conn_rcu() 53 else if (conn->proto.index_key > k.index_key) in rxrpc_find_service_conn_rcu() 74 struct rxrpc_conn_proto k = conn->proto; in rxrpc_publish_service_conn() 86 if (cursor->proto.index_key < k.index_key) in rxrpc_publish_service_conn() 88 else if (cursor->proto.index_key > k.index_key) in rxrpc_publish_service_conn() 167 conn->proto.epoch = sp->hdr.epoch; in rxrpc_new_incoming_connection() 168 conn->proto.cid = sp->hdr.cid & RXRPC_CIDMASK; in rxrpc_new_incoming_connection() 191 _net("CONNECTION new %d {%x}", conn->debug_id, conn->proto.cid); in rxrpc_new_incoming_connection()
|