/net/dsa/ |
D | dsa2.c | 88 static bool dsa_port_is_valid(struct dsa_port *port) in dsa_port_is_valid() argument 90 return !!(port->dn || port->name); in dsa_port_is_valid() 93 static bool dsa_port_is_dsa(struct dsa_port *port) in dsa_port_is_dsa() argument 95 if (port->name && !strcmp(port->name, "dsa")) in dsa_port_is_dsa() 98 return !!of_parse_phandle(port->dn, "link", 0); in dsa_port_is_dsa() 101 static bool dsa_port_is_cpu(struct dsa_port *port) in dsa_port_is_cpu() argument 103 if (port->name && !strcmp(port->name, "cpu")) in dsa_port_is_cpu() 106 return !!of_parse_phandle(port->dn, "ethernet", 0); in dsa_port_is_cpu() 110 struct device_node *port) in dsa_ds_find_port_dn() argument 115 if (ds->ports[index].dn == port) in dsa_ds_find_port_dn() [all …]
|
D | switch.c | 61 return ds->ops->port_bridge_join(ds, info->port, info->br); in dsa_switch_bridge_join() 65 info->port, info->br); in dsa_switch_bridge_join() 74 ds->ops->port_bridge_leave(ds, info->port, info->br); in dsa_switch_bridge_leave() 77 ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port, in dsa_switch_bridge_leave() 93 return ds->ops->port_fdb_add(ds, info->port, info->addr, in dsa_switch_fdb_add() 107 return ds->ops->port_fdb_del(ds, info->port, info->addr, in dsa_switch_fdb_del() 117 int port, err; in dsa_switch_mdb_add() local 122 set_bit(info->port, group); in dsa_switch_mdb_add() 123 for (port = 0; port < ds->num_ports; port++) in dsa_switch_mdb_add() 124 if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)) in dsa_switch_mdb_add() [all …]
|
D | legacy.c | 83 int ret, port; in dsa_cpu_dsa_setups() local 85 for (port = 0; port < ds->num_ports; port++) { in dsa_cpu_dsa_setups() 86 if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))) in dsa_cpu_dsa_setups() 89 ret = dsa_cpu_dsa_setup(&ds->ports[port]); in dsa_cpu_dsa_setups() 262 int port; in dsa_switch_destroy() local 265 for (port = 0; port < ds->num_ports; port++) { in dsa_switch_destroy() 266 if (!(ds->enabled_port_mask & (1 << port))) in dsa_switch_destroy() 269 if (!ds->ports[port].netdev) in dsa_switch_destroy() 272 dsa_slave_destroy(ds->ports[port].netdev); in dsa_switch_destroy() 276 for (port = 0; port < ds->num_ports; port++) { in dsa_switch_destroy() [all …]
|
/net/hsr/ |
D | hsr_slave.c | 25 struct hsr_port *port; in hsr_handle_frame() local 34 port = hsr_port_get_rcu(skb->dev); in hsr_handle_frame() 35 if (!port) in hsr_handle_frame() 38 if (hsr_addr_is_self(port->hsr, eth_hdr(skb)->h_source)) { in hsr_handle_frame() 50 hsr_forward_skb(skb, port); in hsr_handle_frame() 106 static int hsr_portdev_setup(struct net_device *dev, struct hsr_port *port) in hsr_portdev_setup() argument 120 res = netdev_rx_handler_register(dev, hsr_handle_frame, port); in hsr_portdev_setup() 138 struct hsr_port *port, *master; in hsr_add_port() local 147 port = hsr_port_get_hsr(hsr, type); in hsr_add_port() 148 if (port != NULL) in hsr_add_port() [all …]
|
D | hsr_forward.c | 123 struct hsr_port *port) in frame_get_stripped_skb() argument 132 struct hsr_port *port, u8 protoVersion) in hsr_fill_tag() argument 138 if (port->type == HSR_PT_SLAVE_A) in hsr_fill_tag() 159 struct hsr_port *port) in create_tagged_skb() argument 183 hsr_fill_tag(skb, frame, port, port->hsr->protVersion); in create_tagged_skb() 192 struct hsr_port *port) in frame_get_tagged_skb() argument 197 if ((port->type != HSR_PT_SLAVE_A) && (port->type != HSR_PT_SLAVE_B)) { in frame_get_tagged_skb() 202 return create_tagged_skb(frame->skb_std, frame, port); in frame_get_tagged_skb() 226 static int hsr_xmit(struct sk_buff *skb, struct hsr_port *port, in hsr_xmit() argument 230 hsr_addr_subst_dest(frame->node_src, skb, port); in hsr_xmit() [all …]
|
D | hsr_main.c | 27 struct hsr_port *port, *master; in hsr_netdev_notify() local 33 port = hsr_port_get_rtnl(dev); in hsr_netdev_notify() 34 if (port == NULL) { in hsr_netdev_notify() 38 port = hsr_port_get_hsr(hsr, HSR_PT_MASTER); in hsr_netdev_notify() 39 if (port == NULL) { in hsr_netdev_notify() 44 hsr = port->hsr; in hsr_netdev_notify() 54 if (port->type == HSR_PT_MASTER) { in hsr_netdev_notify() 64 if (port->type == HSR_PT_SLAVE_A) { in hsr_netdev_notify() 70 port = hsr_port_get_hsr(hsr, HSR_PT_SLAVE_B); in hsr_netdev_notify() 73 port ? in hsr_netdev_notify() [all …]
|
D | hsr_device.c | 64 struct hsr_port *port; in hsr_check_carrier() local 70 hsr_for_each_port(master->hsr, port) in hsr_check_carrier() 71 if ((port->type != HSR_PT_MASTER) && is_slave_up(port->dev)) { in hsr_check_carrier() 125 struct hsr_port *port; in hsr_get_max_mtu() local 129 hsr_for_each_port(hsr, port) in hsr_get_max_mtu() 130 if (port->type != HSR_PT_MASTER) in hsr_get_max_mtu() 131 mtu_max = min(port->dev->mtu, mtu_max); in hsr_get_max_mtu() 162 struct hsr_port *port; in hsr_dev_open() local 169 hsr_for_each_port(hsr, port) { in hsr_dev_open() 170 if (port->type == HSR_PT_MASTER) in hsr_dev_open() [all …]
|
D | hsr_framereg.c | 173 struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb, in hsr_get_node() argument 176 struct list_head *node_db = &port->hsr->node_db; in hsr_get_node() 205 if (port->type != HSR_PT_MASTER) in hsr_get_node() 299 struct hsr_port *port) in hsr_addr_subst_dest() argument 311 node_dst = find_node_by_AddrA(&port->hsr->node_db, eth_hdr(skb)->h_dest); in hsr_addr_subst_dest() 316 if (port->type != node_dst->AddrB_port) in hsr_addr_subst_dest() 323 void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port, in hsr_register_frame_in() argument 330 if (seq_nr_before(sequence_nr, node->seq_out[port->type])) in hsr_register_frame_in() 333 node->time_in[port->type] = jiffies; in hsr_register_frame_in() 334 node->time_in_stale[port->type] = false; in hsr_register_frame_in() [all …]
|
/net/bridge/ |
D | br_multicast.c | 43 struct net_bridge_port *port); 45 struct net_bridge_port *port, 53 struct net_bridge_port *port, 291 br_mdb_notify(br->dev, p->port, &pg->addr, RTM_DELMDB, in br_multicast_del_pg() 308 struct net_bridge *br = pg->port->br; in br_multicast_port_group_expired() 592 struct net_bridge *br, struct net_bridge_port *port, in br_multicast_get_group() argument 616 port ? port->dev->name : br->dev->name); in br_multicast_get_group() 627 port ? port->dev->name : br->dev->name); in br_multicast_get_group() 640 port ? port->dev->name : br->dev->name); in br_multicast_get_group() 649 port ? port->dev->name : br->dev->name, in br_multicast_get_group() [all …]
|
/net/ipv4/netfilter/ |
D | nf_nat_h323.c | 26 unsigned int addroff, __be32 ip, __be16 port) in set_addr() argument 32 __be16 port; in set_addr() member 38 buf.port = port; in set_addr() 75 union nf_inet_addr *addr, __be16 port) in set_h225_addr() argument 78 addr->ip, port); in set_h225_addr() 85 union nf_inet_addr *addr, __be16 port) in set_h245_addr() argument 89 addr->ip, port); in set_h245_addr() 101 __be16 port; in set_sig_addr() local 105 if (get_h225_addr(ct, *data, &taddr[i], &addr, &port)) { in set_sig_addr() 107 port == info->sig_port[dir]) { in set_sig_addr() [all …]
|
/net/netfilter/ |
D | nf_nat_sip.c | 82 const union nf_inet_addr *addr, u16 port) in sip_sprintf_addr_port() argument 85 return sprintf(buffer, "%pI4:%u", &addr->ip, port); in sip_sprintf_addr_port() 87 return sprintf(buffer, "[%pI6c]:%u", &addr->ip6, port); in sip_sprintf_addr_port() 94 union nf_inet_addr *addr, __be16 port) in map_addr() argument 106 ct->tuplehash[dir].tuple.src.u.udp.port == port) { in map_addr() 108 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr() 110 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr() 113 ct->tuplehash[!dir].tuple.src.u.udp.port; in map_addr() 117 if (nf_inet_addr_cmp(&newaddr, addr) && newport == port) in map_addr() 134 __be16 port; in map_sip_addr() local [all …]
|
D | nf_nat_ftp.c | 31 union nf_inet_addr *addr, u16 port) in nf_nat_ftp_fmt_cmd() argument 41 port >> 8, in nf_nat_ftp_fmt_cmd() 42 port & 0xFF); in nf_nat_ftp_fmt_cmd() 46 &addr->ip, port); in nf_nat_ftp_fmt_cmd() 49 &addr->ip6, port); in nf_nat_ftp_fmt_cmd() 51 return snprintf(buffer, buflen, "|||%u|", port); in nf_nat_ftp_fmt_cmd() 68 u_int16_t port; in nf_nat_ftp() local 78 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in nf_nat_ftp() 86 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in nf_nat_ftp() 89 exp->tuple.dst.u.tcp.port = htons(port); in nf_nat_ftp() [all …]
|
D | nf_nat_irc.c | 39 u_int16_t port; in help() local 44 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in help() 49 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in help() 52 exp->tuple.dst.u.tcp.port = htons(port); in help() 57 port = 0; in help() 62 if (port == 0) { in help() 81 snprintf(buffer, sizeof(buffer), "%u %u", ntohl(newaddr.ip), port); in help() 83 buffer, &newaddr.ip, port); in help()
|
D | nf_nat_amanda.c | 35 u_int16_t port; in help() local 38 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in help() 46 for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) { in help() 49 exp->tuple.dst.u.tcp.port = htons(port); in help() 54 port = 0; in help() 59 if (port == 0) { in help() 64 sprintf(buffer, "%u", port); in help()
|
D | nf_conntrack_h323_main.c | 56 union nf_inet_addr *addr, __be16 port) 61 union nf_inet_addr *addr, __be16 port) 79 __be16 port, __be16 rtp_port, 87 H245_TransportAddress *taddr, __be16 port, 94 TransportAddress *taddr, __be16 port, 101 TransportAddress *taddr, __be16 port, 108 __be16 port, struct nf_conntrack_expect *exp) 225 union nf_inet_addr *addr, __be16 *port) in get_h245_addr() argument 252 memcpy(port, p + len, sizeof(__be16)); in get_h245_addr() 266 __be16 port; in expect_rtp_rtcp() local [all …]
|
/net/netfilter/ipset/ |
D | ip_set_hash_ipport.c | 47 __be16 port; member 60 ip1->port == ip2->port && in hash_ipport4_data_equal() 69 nla_put_net16(skb, IPSET_ATTR_PORT, data->port) || in hash_ipport4_data_list() 83 next->port = d->port; in hash_ipport4_data_next() 100 &e.port, &e.proto)) in hash_ipport4_kadt() 115 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipport4_uadt() local 135 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipport4_uadt() 148 e.port = 0; in hash_ipport4_uadt() 172 port_to = port = ntohs(e.port); in hash_ipport4_uadt() 175 if (port > port_to) in hash_ipport4_uadt() [all …]
|
D | ip_set_hash_ipportip.c | 48 __be16 port; member 60 ip1->port == ip2->port && in hash_ipportip4_data_equal() 70 nla_put_net16(skb, IPSET_ATTR_PORT, data->port) || in hash_ipportip4_data_list() 84 next->port = d->port; in hash_ipportip4_data_next() 102 &e.port, &e.proto)) in hash_ipportip4_kadt() 118 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipportip4_uadt() local 142 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportip4_uadt() 155 e.port = 0; in hash_ipportip4_uadt() 179 port_to = port = ntohs(e.port); in hash_ipportip4_uadt() 182 if (port > port_to) in hash_ipportip4_uadt() [all …]
|
D | ip_set_hash_netport.c | 56 __be16 port; member 70 ip1->port == ip2->port && in hash_netport4_data_equal() 107 nla_put_net16(skb, IPSET_ATTR_PORT, data->port) || in hash_netport4_data_list() 124 next->port = d->port; in hash_netport4_data_next() 147 &e.port, &e.proto)) in hash_netport4_kadt() 164 u32 port, port_to, p = 0, ip = 0, ip_to = 0; in hash_netport4_uadt() local 193 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_netport4_uadt() 206 e.port = 0; in hash_netport4_uadt() 224 port = port_to = ntohs(e.port); in hash_netport4_uadt() 227 if (port_to < port) in hash_netport4_uadt() [all …]
|
D | ip_set_hash_ipportnet.c | 58 __be16 port; member 74 ip1->port == ip2->port && in hash_ipportnet4_data_equal() 111 nla_put_net16(skb, IPSET_ATTR_PORT, data->port) || in hash_ipportnet4_data_list() 128 next->port = d->port; in hash_ipportnet4_data_next() 152 &e.port, &e.proto)) in hash_ipportnet4_kadt() 170 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_ipportnet4_uadt() local 204 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportnet4_uadt() 217 e.port = 0; in hash_ipportnet4_uadt() 252 port_to = port = ntohs(e.port); in hash_ipportnet4_uadt() 255 if (port > port_to) in hash_ipportnet4_uadt() [all …]
|
D | ip_set_hash_netportnet.c | 51 __be16 port; member 70 ip1->port == ip2->port && in hash_netportnet4_data_equal() 120 nla_put_net16(skb, IPSET_ATTR_PORT, data->port) || in hash_netportnet4_data_list() 138 next->port = d->port; in hash_netportnet4_data_next() 168 &e.port, &e.proto)) in hash_netportnet4_kadt() 187 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_netportnet4_uadt() local 226 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_netportnet4_uadt() 239 e.port = 0; in hash_netportnet4_uadt() 271 port_to = port = ntohs(e.port); in hash_netportnet4_uadt() 274 if (port > port_to) in hash_netportnet4_uadt() [all …]
|
D | ip_set_getport.c | 25 bool src, __be16 *port, u8 *proto) in get_port() argument 37 *port = src ? th->source : th->dest; in get_port() 49 *port = src ? sh->source : sh->dest; in get_port() 62 *port = src ? uh->source : uh->dest; in get_port() 73 *port = (__force __be16)htons((ic->type << 8) | ic->code); in get_port() 84 *port = (__force __be16) in get_port() 98 __be16 *port, u8 *proto) in ip_set_get_ip4_port() argument 125 return get_port(skb, protocol, protooff, src, port, proto); in ip_set_get_ip4_port() 132 __be16 *port, u8 *proto) in ip_set_get_ip6_port() argument 146 return get_port(skb, nexthdr, protoff, src, port, proto); in ip_set_get_ip6_port() [all …]
|
D | ip_set_bitmap_port.c | 53 port_to_id(const struct bitmap_port *m, u16 port) in port_to_id() argument 55 return port - m->first_port; in port_to_id() 112 u16 port = 0; in bitmap_port_kadt() local 118 port = ntohs(__port); in bitmap_port_kadt() 120 if (port < map->first_port || port > map->last_port) in bitmap_port_kadt() 123 e.id = port_to_id(map, port); in bitmap_port_kadt() 136 u32 port; /* wraparound */ in bitmap_port_uadt() local 147 port = ip_set_get_h16(tb[IPSET_ATTR_PORT]); in bitmap_port_uadt() 148 if (port < map->first_port || port > map->last_port) in bitmap_port_uadt() 155 e.id = port_to_id(map, port); in bitmap_port_uadt() [all …]
|
/net/bluetooth/rfcomm/ |
D | tty.c | 47 struct tty_port port; member 81 static void rfcomm_dev_destruct(struct tty_port *port) in rfcomm_dev_destruct() argument 83 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_destruct() 111 static int rfcomm_dev_activate(struct tty_port *port, struct tty_struct *tty) in rfcomm_dev_activate() argument 113 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_activate() 123 static int rfcomm_dev_carrier_raised(struct tty_port *port) in rfcomm_dev_carrier_raised() argument 125 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_carrier_raised() 131 static void rfcomm_dev_shutdown(struct tty_port *port) in rfcomm_dev_shutdown() argument 133 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_shutdown() 168 if (dev && !tty_port_get(&dev->port)) in rfcomm_dev_get() [all …]
|
/net/rds/ |
D | cong.c | 292 void rds_cong_set_bit(struct rds_cong_map *map, __be16 port) in rds_cong_set_bit() argument 298 &map->m_addr, ntohs(port), map); in rds_cong_set_bit() 300 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; in rds_cong_set_bit() 301 off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; in rds_cong_set_bit() 306 void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port) in rds_cong_clear_bit() argument 312 &map->m_addr, ntohs(port), map); in rds_cong_clear_bit() 314 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; in rds_cong_clear_bit() 315 off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; in rds_cong_clear_bit() 320 static int rds_cong_test_bit(struct rds_cong_map *map, __be16 port) in rds_cong_test_bit() argument 325 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; in rds_cong_test_bit() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_ftp.c | 90 __be32 *addr, __be16 *port, in ip_vs_ftp_get_addrport() argument 152 *port = get_unaligned((__be16 *) (p + 4)); in ip_vs_ftp_get_addrport() 177 __be16 port; in ip_vs_ftp_out() local 213 &from.ip, &port, in ip_vs_ftp_out() 218 &from.ip, ntohs(port), &cp->caddr.ip, 0); in ip_vs_ftp_out() 226 iph->protocol, &from, port, in ip_vs_ftp_out() 234 0, &cp->vaddr, port, &p); in ip_vs_ftp_out() 236 n_cp = ip_vs_conn_new(&p, AF_INET, &from, port, in ip_vs_ftp_out() 251 port = n_cp->vport; in ip_vs_ftp_out() 257 ntohs(port) >> 8, in ip_vs_ftp_out() [all …]
|