/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 …]
|
/net/netfilter/ |
D | nf_conntrack_proto_tcp.c | 265 seq_printf(s, "%s ", tcp_conntrack_names[ct->proto.tcp.state]); in tcp_print_conntrack() 457 struct ip_ct_tcp *state = &ct->proto.tcp; in tcp_in_window() 792 const struct ip_ct_tcp_state *sender = &ct->proto.tcp.seen[0]; in tcp_new() 793 const struct ip_ct_tcp_state *receiver = &ct->proto.tcp.seen[1]; in tcp_new() 805 memset(&ct->proto.tcp, 0, sizeof(ct->proto.tcp)); in tcp_new() 807 ct->proto.tcp.seen[0].td_end = in tcp_new() 810 ct->proto.tcp.seen[0].td_maxwin = ntohs(th->window); in tcp_new() 811 if (ct->proto.tcp.seen[0].td_maxwin == 0) in tcp_new() 812 ct->proto.tcp.seen[0].td_maxwin = 1; in tcp_new() 813 ct->proto.tcp.seen[0].td_maxend = 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 | 409 ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT; in dccp_new() 410 ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER; in dccp_new() 411 ct->proto.dccp.state = CT_DCCP_NONE; in dccp_new() 412 ct->proto.dccp.last_pkt = DCCP_PKT_REQUEST; in dccp_new() 413 ct->proto.dccp.last_dir = IP_CT_DIR_ORIGINAL; in dccp_new() 414 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()
|
D | nft_compat.c | 146 union nft_entry *entry, u16 proto, bool inv) in nft_target_set_tgchk_param() argument 152 entry->e4.ip.proto = proto; in nft_target_set_tgchk_param() 156 if (proto) in nft_target_set_tgchk_param() 159 entry->e6.ipv6.proto = proto; in nft_target_set_tgchk_param() 163 entry->ebt.ethproto = (__force __be16)proto; in nft_target_set_tgchk_param() 200 static int nft_parse_compat(const struct nlattr *attr, u16 *proto, bool *inv) in nft_parse_compat() argument 226 *proto = l4proto; in nft_parse_compat() 250 u16 proto = 0; in nft_target_init() local 258 ret = nft_parse_compat(ctx->nla[NFTA_RULE_COMPAT], &proto, &inv); in nft_target_init() 263 nft_target_set_tgchk_param(&par, ctx, target, info, &e, proto, inv); in nft_target_init() [all …]
|
/net/8021q/ |
D | vlan_core.c | 164 __be16 proto; member 169 static bool vlan_hw_filter_capable(const struct net_device *dev, __be16 proto) in vlan_hw_filter_capable() argument 171 if (proto == htons(ETH_P_8021Q) && in vlan_hw_filter_capable() 174 if (proto == htons(ETH_P_8021AD) && in vlan_hw_filter_capable() 181 __be16 proto, u16 vid) in vlan_vid_info_get() argument 186 if (vid_info->proto == proto && vid_info->vid == vid) in vlan_vid_info_get() 192 static struct vlan_vid_info *vlan_vid_info_alloc(__be16 proto, u16 vid) in vlan_vid_info_alloc() argument 199 vid_info->proto = proto; in vlan_vid_info_alloc() 205 static int vlan_add_rx_filter_info(struct net_device *dev, __be16 proto, u16 vid) in vlan_add_rx_filter_info() argument 207 if (!vlan_hw_filter_capable(dev, proto)) in vlan_add_rx_filter_info() [all …]
|
/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 | 96 int proto = iph->protocol; in esp4_gso_encap() local 105 xo->proto = proto; in esp4_gso_encap() 125 ops = rcu_dereference(inet_offloads[xo->proto]); in xfrm4_transport_gso_segment() 139 u8 proto = xo->proto; in xfrm4_beet_gso_segment() local 144 if (proto == IPPROTO_BEETPH) { in xfrm4_beet_gso_segment() 149 proto = ph->nexthdr; in xfrm4_beet_gso_segment() 157 ipv6_skip_exthdr(skb, 0, &proto, &frag); in xfrm4_beet_gso_segment() 158 if (proto == IPPROTO_TCP) in xfrm4_beet_gso_segment() 162 if (proto == IPPROTO_IPV6) in xfrm4_beet_gso_segment() 166 ops = rcu_dereference(inet_offloads[proto]); in xfrm4_beet_gso_segment() [all …]
|
/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 | 39 static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto) in ipv6_gso_pull_exthdrs() argument 47 if (proto != NEXTHDR_HOP) { in ipv6_gso_pull_exthdrs() 48 ops = rcu_dereference(inet6_offloads[proto]); in ipv6_gso_pull_exthdrs() 67 proto = opth->nexthdr; in ipv6_gso_pull_exthdrs() 71 return proto; in ipv6_gso_pull_exthdrs() 80 int proto; in ipv6_gso_segment() local 103 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); in ipv6_gso_segment() 107 udpfrag = proto == IPPROTO_UDP && encap && in ipv6_gso_segment() 110 udpfrag = proto == IPPROTO_UDP && !skb->encapsulation && in ipv6_gso_segment() 113 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 | 45 u8 proto; member 58 ip1->proto == ip2->proto; in hash_ipport4_data_equal() 67 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto)) in hash_ipport4_data_list() 97 &e.port, &e.proto)) in hash_ipport4_kadt() 135 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipport4_uadt() 136 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipport4_uadt() 138 if (e.proto == 0) in hash_ipport4_uadt() 144 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipport4_uadt() 204 u8 proto; member 217 ip1->proto == ip2->proto; in hash_ipport6_data_equal() [all …]
|
D | ip_set_hash_ipportip.c | 46 u8 proto; member 58 ip1->proto == ip2->proto; in hash_ipportip4_data_equal() 68 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto)) in hash_ipportip4_data_list() 99 &e.port, &e.proto)) in hash_ipportip4_kadt() 142 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportip4_uadt() 143 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipportip4_uadt() 145 if (e.proto == 0) in hash_ipportip4_uadt() 151 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipportip4_uadt() 212 u8 proto; member 226 ip1->proto == ip2->proto; in hash_ipportip6_data_equal() [all …]
|
D | ip_set_hash_netport.c | 54 u8 proto; member 68 ip1->proto == ip2->proto && in hash_netport4_data_equal() 106 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_netport4_data_list() 144 &e.port, &e.proto)) in hash_netport4_kadt() 193 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_netport4_uadt() 194 with_ports = ip_set_proto_with_ports(e.proto); in hash_netport4_uadt() 196 if (e.proto == 0) in hash_netport4_uadt() 202 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_netport4_uadt() 271 u8 proto; member 285 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 | 58 u8 proto; member 72 ip1->proto == ip2->proto; in hash_ipportnet4_data_equal() 110 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_ipportnet4_data_list() 149 &e.port, &e.proto)) in hash_ipportnet4_kadt() 204 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportnet4_uadt() 205 with_ports = ip_set_proto_with_ports(e.proto); in hash_ipportnet4_uadt() 207 if (e.proto == 0) in hash_ipportnet4_uadt() 213 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_ipportnet4_uadt() 313 u8 proto; member 327 ip1->proto == ip2->proto; in hash_ipportnet6_data_equal() [all …]
|
D | ip_set_hash_netportnet.c | 56 u8 proto; member 69 ip1->proto == ip2->proto; in hash_netportnet4_data_equal() 121 nla_put_u8(skb, IPSET_ATTR_PROTO, data->proto) || in hash_netportnet4_data_list() 166 &e.port, &e.proto)) in hash_netportnet4_kadt() 237 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_netportnet4_uadt() 238 with_ports = ip_set_proto_with_ports(e.proto); in hash_netportnet4_uadt() 240 if (e.proto == 0) in hash_netportnet4_uadt() 246 if (!(with_ports || e.proto == IPPROTO_ICMP)) in hash_netportnet4_uadt() 347 u8 proto; member 361 ip1->proto == ip2->proto; in hash_netportnet6_data_equal() [all …]
|
/net/unix/ |
D | unix_bpf.c | 95 static struct proto *unix_dgram_prot_saved __read_mostly; 97 static struct proto unix_dgram_bpf_prot; 99 static struct proto *unix_stream_prot_saved __read_mostly; 101 static struct proto unix_stream_bpf_prot; 103 static void unix_dgram_bpf_rebuild_protos(struct proto *prot, const struct proto *base) in unix_dgram_bpf_rebuild_protos() 111 static void unix_stream_bpf_rebuild_protos(struct proto *prot, in unix_stream_bpf_rebuild_protos() 112 const struct proto *base) in unix_stream_bpf_rebuild_protos() 121 static void unix_dgram_bpf_check_needs_rebuild(struct proto *ops) in unix_dgram_bpf_check_needs_rebuild() 133 static void unix_stream_bpf_check_needs_rebuild(struct proto *ops) in unix_stream_bpf_check_needs_rebuild()
|
/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() 111 x->id.proto, x->props.family, in xfrm_hash_transfer() 215 switch (type->proto) { in xfrm_register_type() 260 switch (type->proto) { in xfrm_unregister_type() 291 static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) in xfrm_get_type() argument 302 switch (proto) { in xfrm_get_type() 334 request_module("xfrm-type-%d-%d", family, proto); in xfrm_get_type() 356 switch (type->proto) { in xfrm_register_type_offload() 380 switch (type->proto) { in xfrm_unregister_type_offload() [all …]
|
/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 20 u8 proto = ip6h->nexthdr; in nf_reject_v6_csum_ok() local 30 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); in nf_reject_v6_csum_ok() 34 if (!nf_reject_verify_csum(proto)) in nf_reject_v6_csum_ok() 37 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in nf_reject_v6_csum_ok() 154 u8 proto; in nf_reject_ip6_tcphdr_get() local 158 proto = oip6h->nexthdr; in nf_reject_ip6_tcphdr_get() 160 &proto, &frag_off); in nf_reject_ip6_tcphdr_get() 170 if (proto != IPPROTO_TCP || *otcplen < sizeof(struct tcphdr)) { in nf_reject_ip6_tcphdr_get() 172 proto, *otcplen); in nf_reject_ip6_tcphdr_get() 380 u8 proto; in reject6_csum_ok() local [all …]
|
/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() 166 conn->proto.epoch = sp->hdr.epoch; in rxrpc_new_incoming_connection() 167 conn->proto.cid = sp->hdr.cid & RXRPC_CIDMASK; in rxrpc_new_incoming_connection() 189 _net("CONNECTION new %d {%x}", conn->debug_id, conn->proto.cid); in rxrpc_new_incoming_connection()
|