/kernel/liteos_a/net/lwip-2.1/enhancement/src/ |
D | fixme.c | 54 err_t netif_dhcp_off(struct netif *netif) in netif_dhcp_off() argument 60 if (netif == NULL) { in netif_dhcp_off() 63 old_ipaddr = netif->ip_addr; in netif_dhcp_off() 64 old_netmask = netif->netmask; in netif_dhcp_off() 65 old_gateway = netif->gw; in netif_dhcp_off() 67 if (netif_dhcp_data(netif)) { in netif_dhcp_off() 68 (void)dhcp_release(netif); in netif_dhcp_off() 69 (void)dhcp_stop(netif); in netif_dhcp_off() 70 (void)dhcp_cleanup(netif); in netif_dhcp_off() 74 ip_addr_set_val(&netif->ip_addr, &old_ipaddr); in netif_dhcp_off() [all …]
|
D | dhcps.c | 89 struct netif *netif; member 101 #define netif_get_dhcps(netif) ((struct dhcps*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_… argument 102 #define netif_set_dhcps(netif, dhcps) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHC… argument 117 LWIP_STATIC void handle_discover(struct netif *netif, struct dhcps *dhcps, struct dhcp_msg *client_… 119 LWIP_STATIC ip4_addr_t validate_request_message(struct netif *netif, struct dhcp_msg *client_msg, 121 LWIP_STATIC void handle_request(struct netif *netif, struct dhcps *dhcps, struct dhcp_msg *client_m… 123 LWIP_STATIC void handle_decline(struct netif *netif, struct dhcps *dhcps, struct dhcp_msg *client_m… 125 LWIP_STATIC void handle_inform(struct netif *netif, struct dhcps *dhcps, struct dhcp_msg *client_ms… 126 LWIP_STATIC void handle_client_messages(struct netif *netif, struct dhcps *dhcps, 221 (htonl(dhcps->start_addr.addr + (u32_t)i) != ip_2_ip4(&dhcps->netif->ip_addr)->addr)) { in find_free_slot() [all …]
|
D | api_shell.c | 106 int print_netif(struct netif *netif, char *print_buf, unsigned int buf_len); 124 void lwip_arp_show_internal(struct netif *netif, char *printf_buf, unsigned int buf_len); 269 int print_netif(struct netif *netif, char *print_buf, unsigned int buf_len) in print_netif() argument 280 if (netif->link_layer_type == LOOPBACK_IF) { in print_netif() 281 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "%.2s\t", netif->name); in print_netif() 283 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "%s\t", netif_get_name(netif)); in print_netif() 290 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "ip:%s ", ipaddr_ntoa(&netif->ip_addr)); in print_netif() 296 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "netmask:%s ", ipaddr_ntoa(&netif->netmask)); in print_netif() 302 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "gateway:%s\n", ipaddr_ntoa(&netif->gw)); in print_netif() 312 if (!ip6_addr_isvalid(netif->ip6_addr_state[i])) { in print_netif() [all …]
|
/kernel/uniproton/src/net/lwip-2.1/src/ |
D | driverif.c | 38 static void OsDriverifGetIfnamePrefix(struct netif *netif, char *prefix, int prefixLen) in OsDriverifGetIfnamePrefix() argument 40 if (prefix == NULL || netif == NULL) { in OsDriverifGetIfnamePrefix() 44 switch (netif->link_layer_type) { in OsDriverifGetIfnamePrefix() 60 static void OsDriverifInitIfname(struct netif *netif) in OsDriverifInitIfname() argument 62 struct netif *tmpNetif = NULL; in OsDriverifInitIfname() 65 OsDriverifGetIfnamePrefix(netif, prefix, NETIF_NAME_PREFIX_MAX_LENGTH); in OsDriverifInitIfname() 66 netif->name[0] = prefix[0]; in OsDriverifInitIfname() 67 netif->name[1] = prefix[1]; in OsDriverifInitIfname() 69 if (netif->full_name[0] != '\0') { in OsDriverifInitIfname() 70 LWIP_DEBUGF(DRIVERIF_DEBUG, ("netif already has fullname %s\n", netif->full_name)); in OsDriverifInitIfname() [all …]
|
D | sockets.c | 288 struct netif *netif = NULL; in OsLwipIoctlInternalSiocgifConf() local 299 for (netif = netif_list; netif != NULL; netif = netif->next) { in OsLwipIoctlInternalSiocgifConf() 311 if (netif->link_layer_type == LOOPBACK_IF) { in OsLwipIoctlInternalSiocgifConf() 312 ret = snprintf_s(ifreq.ifr_name, IFNAMSIZ, (IFNAMSIZ - 1), "%.2s", netif->name); in OsLwipIoctlInternalSiocgifConf() 318 ret = snprintf_s(ifreq.ifr_name, IFNAMSIZ, (IFNAMSIZ - 1), "%s", netif_get_name(netif)); in OsLwipIoctlInternalSiocgifConf() 327 sockIn->sin_addr.s_addr = ip_2_ip4(&netif->ip_addr)->addr; in OsLwipIoctlInternalSiocgifConf() 344 struct netif *netif = netif_find(ifr->ifr_name); in OsLwipIoctlInternalSiocgifAddr() local 345 if (netif == NULL) { in OsLwipIoctlInternalSiocgifAddr() 350 sockIn->sin_addr.s_addr = ip_2_ip4(&netif->ip_addr)->addr; in OsLwipIoctlInternalSiocgifAddr() 359 struct netif *netif = netif_find(ifr->ifr_name); in OsLwipIoctlInternalSiocgifNetmask() local [all …]
|
/kernel/liteos_m/components/net/lwip-2.1/porting/src/ |
D | driverif.c | 56 LWIP_STATIC void driverif_get_ifname_prefix(struct netif *netif, char *prefix, int prefixLen) in driverif_get_ifname_prefix() argument 58 if (prefix == NULL || netif == NULL) { in driverif_get_ifname_prefix() 62 switch (netif->link_layer_type) { in driverif_get_ifname_prefix() 78 LWIP_STATIC void driverif_init_ifname(struct netif *netif) in driverif_init_ifname() argument 80 struct netif *tmpnetif = NULL; in driverif_init_ifname() 83 driverif_get_ifname_prefix(netif, prefix, NETIF_NAME_PREFIX_MAX_LENGTH); in driverif_init_ifname() 84 netif->name[0] = prefix[0]; in driverif_init_ifname() 85 netif->name[1] = prefix[1]; in driverif_init_ifname() 87 if (netif->full_name[0] != '\0') { in driverif_init_ifname() 88 LWIP_DEBUGF(DRIVERIF_DEBUG, ("netif already has fullname %s\n", netif->full_name)); in driverif_init_ifname() [all …]
|
D | sockets_porting.c | 297 struct netif *netif = NULL; in lwip_ioctl_internal_SIOCGIFCONF() local 310 for (netif = netif_list; netif != NULL; netif = netif->next) { in lwip_ioctl_internal_SIOCGIFCONF() 320 if (netif->link_layer_type == LOOPBACK_IF) { in lwip_ioctl_internal_SIOCGIFCONF() 321 ret = snprintf_s(ifreq.ifr_name, IFNAMSIZ, (IFNAMSIZ - 1), "%.2s", netif->name); in lwip_ioctl_internal_SIOCGIFCONF() 327 ret = snprintf_s(ifreq.ifr_name, IFNAMSIZ, (IFNAMSIZ - 1), "%s", netif_get_name(netif)); in lwip_ioctl_internal_SIOCGIFCONF() 336 sock_in->sin_addr.s_addr = ip_2_ip4(&netif->ip_addr)->addr; in lwip_ioctl_internal_SIOCGIFCONF() 351 struct netif *netif = NULL; in lwip_ioctl_internal_SIOCGIFADDR() local 355 netif = netif_find(ifr->ifr_name); in lwip_ioctl_internal_SIOCGIFADDR() 356 if (netif == NULL) { in lwip_ioctl_internal_SIOCGIFADDR() 361 sock_in->sin_addr.s_addr = ip_2_ip4(&netif->ip_addr)->addr; in lwip_ioctl_internal_SIOCGIFADDR() [all …]
|
D | api_shell.c | 55 int print_netif(struct netif *netif, char *print_buf, unsigned int buf_len); 92 int print_netif(struct netif *netif, char *print_buf, unsigned int buf_len) in print_netif() argument 100 if (netif->link_layer_type == LOOPBACK_IF) { in print_netif() 101 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "%s\t", netif->name); in print_netif() 103 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "%s%u\t", netif->name, netif->num); in print_netif() 111 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "ip:%s ", ipaddr_ntoa(&netif->ip_addr)); in print_netif() 117 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "netmask:%s ", ipaddr_ntoa(&netif->netmask)); in print_netif() 123 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "gateway:%s\n", ipaddr_ntoa(&netif->gw)); in print_netif() 135 for (i = 0; i < netif->hwaddr_len - 1; i++) { in print_netif() 136 ret = snprintf_s(tmp, buf_len, (buf_len - 1), "%02x:", netif->hwaddr[i]); in print_netif() [all …]
|
/kernel/liteos_a/net/lwip-2.1/porting/src/ |
D | sockets.c | 190 struct netif *netif = NULL; in ip_addr_isbroadcast_bysock() local 191 NETIF_FOREACH(netif) { in ip_addr_isbroadcast_bysock() 192 if (ip_addr_cmp(&netif->ip_addr, &addr)) { in ip_addr_isbroadcast_bysock() 193 return ip_addr_isbroadcast(ipaddr, netif); in ip_addr_isbroadcast_bysock() 196 if (ip_addr_cmp(&netif->ip6_addr[i], &addr)) { in ip_addr_isbroadcast_bysock() 197 return ip_addr_isbroadcast(ipaddr, netif); in ip_addr_isbroadcast_bysock() 409 struct netif *netif = NULL; in lwip_ioctl_internal_SIOCADDRT() local 432 for (netif = netif_list; netif != NULL; netif = netif->next) { in lwip_ioctl_internal_SIOCADDRT() 433 if (ip_addr_netcmp(&rtgw_addr, &netif->ip_addr, ip_2_ip4(&netif->netmask))) { in lwip_ioctl_internal_SIOCADDRT() 438 if (netif == NULL) { in lwip_ioctl_internal_SIOCADDRT() [all …]
|
D | driverif.c | 52 driverif_init_ifname(struct netif *netif) in driverif_init_ifname() argument 54 struct netif *tmpnetif = NULL; in driverif_init_ifname() 55 const char *prefix = (netif->link_layer_type == WIFI_DRIVER_IF) ? "wlan" : "eth"; in driverif_init_ifname() 57 netif->name[0] = prefix[0]; in driverif_init_ifname() 58 netif->name[1] = prefix[1]; in driverif_init_ifname() 61 if (snprintf_s(netif->full_name, sizeof(netif->full_name), sizeof(netif->full_name) - 1, in driverif_init_ifname() 66 if (strcmp(tmpnetif->full_name, netif->full_name) == 0) { in driverif_init_ifname() 74 netif->full_name[0] = '\0'; in driverif_init_ifname() 94 driverif_output(struct netif *netif, struct pbuf *p) in driverif_output() argument 97 (void *)p, p->tot_len, (void *)netif)); in driverif_output() [all …]
|
/kernel/linux/linux-5.10/security/selinux/ |
D | netif.c | 72 struct sel_netif *netif; in sel_netif_find() local 74 list_for_each_entry_rcu(netif, &sel_netif_hash[idx], list) in sel_netif_find() 75 if (net_eq(netif->nsec.ns, ns) && in sel_netif_find() 76 netif->nsec.ifindex == ifindex) in sel_netif_find() 77 return netif; in sel_netif_find() 91 static int sel_netif_insert(struct sel_netif *netif) in sel_netif_insert() argument 98 idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex); in sel_netif_insert() 99 list_add_rcu(&netif->list, &sel_netif_hash[idx]); in sel_netif_insert() 113 static void sel_netif_destroy(struct sel_netif *netif) in sel_netif_destroy() argument 115 list_del_rcu(&netif->list); in sel_netif_destroy() [all …]
|
/kernel/uniproton/src/net/lwip-2.1/enhancement/src/ |
D | lwip_ifaddrs.c | 87 static int OsGetIfaName(struct netif *netif, struct ifaddrs *ifaddr) in OsGetIfaName() argument 91 if (netif->link_layer_type == LOOPBACK_IF) { in OsGetIfaName() 93 … ret = snprintf_s(ifaddr->ifa_name, NETIF_NAMESIZE, (NETIF_NAMESIZE - 1), "%.2s", netif->name); in OsGetIfaName() 95 … = snprintf_s(ifaddr->ifa_name, NETIF_NAMESIZE, (NETIF_NAMESIZE - 1), "%s", netif_get_name(netif)); in OsGetIfaName() 102 static int OsGetIpv4Ifaddr(struct netif *netif, struct ifaddrs *ifaddr) in OsGetIpv4Ifaddr() argument 106 if (netif->flags & NETIF_FLAG_UP) { in OsGetIpv4Ifaddr() 110 if (netif->flags & NETIF_FLAG_ETHARP) { in OsGetIpv4Ifaddr() 116 if (netif->flags & NETIF_FLAG_BROADCAST) { in OsGetIpv4Ifaddr() 121 if (dhcp_supplied_address(netif)) { in OsGetIpv4Ifaddr() 127 if (netif->flags & NETIF_FLAG_IGMP) { in OsGetIpv4Ifaddr() [all …]
|
D | fixme.c | 25 err_t OsDhcpIsBound(struct netif *netif) in OsDhcpIsBound() argument 29 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG); in OsDhcpIsBound() 31 dhcp = netif_dhcp_data(netif); in OsDhcpIsBound() 42 static struct netif *OsNetifFindByName(const char *name) in OsNetifFindByName() 44 struct netif *netif = NULL; in OsNetifFindByName() local 49 NETIF_FOREACH(netif) { in OsNetifFindByName() 50 if (strcmp("lo", name) == 0 && (netif->name[0] == 'l' && netif->name[1] == 'o')) { in OsNetifFindByName() 52 return netif; in OsNetifFindByName() 55 if (strcmp(netif->full_name, name) == 0) { in OsNetifFindByName() 57 return netif; in OsNetifFindByName() [all …]
|
/kernel/liteos_m/components/net/lwip-2.1/enhancement/src/ |
D | lwip_ifaddrs.c | 101 static int get_ifa_name(struct netif *netif, struct ifaddrs *ifaddr) in get_ifa_name() argument 105 if (netif->link_layer_type == LOOPBACK_IF) { in get_ifa_name() 107 … ret = snprintf_s(ifaddr->ifa_name, NETIF_NAMESIZE, (NETIF_NAMESIZE - 1), "%.2s", netif->name); in get_ifa_name() 109 … = snprintf_s(ifaddr->ifa_name, NETIF_NAMESIZE, (NETIF_NAMESIZE - 1), "%s", netif_get_name(netif)); in get_ifa_name() 116 static int get_ipv4_ifaddr(struct netif *netif, struct ifaddrs *ifaddr) in get_ipv4_ifaddr() argument 120 if (netif->flags & NETIF_FLAG_UP) { in get_ipv4_ifaddr() 124 if (netif->flags & NETIF_FLAG_ETHARP) { in get_ipv4_ifaddr() 130 if (netif->flags & NETIF_FLAG_BROADCAST) { in get_ipv4_ifaddr() 135 if (dhcp_supplied_address(netif)) { in get_ipv4_ifaddr() 141 if (netif->flags & NETIF_FLAG_IGMP) { in get_ipv4_ifaddr() [all …]
|
D | fixme.c | 46 err_t dhcp_is_bound(struct netif *netif) in dhcp_is_bound() argument 50 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG); in dhcp_is_bound() 52 dhcp = netif_dhcp_data(netif); in dhcp_is_bound() 63 static struct netif *netif_find_by_name(const char *name) in netif_find_by_name() 65 struct netif *netif = NULL; in netif_find_by_name() local 70 NETIF_FOREACH(netif) { in netif_find_by_name() 71 if (strcmp("lo", name) == 0 && (netif->name[0] == 'l' && netif->name[1] == 'o')) { in netif_find_by_name() 73 return netif; in netif_find_by_name() 76 if (strcmp(netif->full_name, name) == 0) { in netif_find_by_name() 78 return netif; in netif_find_by_name() [all …]
|
/kernel/uniproton/src/net/lwip-2.1/include/lwip/ |
D | netif.h | 31 void (*drv_send)(struct netif *netif, struct pbuf *p); \ 32 u8_t (*drv_set_hwaddr)(struct netif *netif, u8_t *addr, u8_t len); \ 33 void (*drv_config)(struct netif *netif, u32_t config_flags, u8_t setBit); \ 36 #include_next <lwip/netif.h> 53 err_t driverif_init(struct netif *netif); 54 void driverif_input(struct netif *netif, struct pbuf *p); 56 #define netif_get_name(netif) ((netif)->full_name) argument
|
D | netifapi.h | 21 err_t netifapi_dhcps_start(struct netif *netif, char *start_ip, u16_t ip_num); 22 err_t netifapi_dhcps_stop(struct netif *netif); 27 void netifapi_netif_rmv_ip6_address(struct netif *netif, ip_addr_t *ipaddr); 28 struct netif *OsNetifapiNetifFindByName(const char *name);
|
/kernel/liteos_m/components/net/lwip-2.1/porting/include/lwip/ |
D | netif.h | 47 void (*drv_send)(struct netif *netif, struct pbuf *p); \ 48 u8_t (*drv_set_hwaddr)(struct netif *netif, u8_t *addr, u8_t len); \ 49 void (*drv_config)(struct netif *netif, u32_t config_flags, u8_t setBit); \ 52 #include_next <lwip/netif.h> 73 err_t driverif_init(struct netif *netif); 74 void driverif_input(struct netif *netif, struct pbuf *p); 76 #define netif_get_name(netif) ((netif)->full_name) argument
|
D | netifapi.h | 41 err_t netifapi_dhcps_start(struct netif *netif, char *start_ip, u16_t ip_num); 42 err_t netifapi_dhcps_stop(struct netif *netif); 47 void netifapi_netif_rmv_ip6_address(struct netif *netif, ip_addr_t *ipaddr); 48 struct netif *netifapi_netif_find_by_name(const char *name);
|
/kernel/liteos_a/net/lwip-2.1/porting/include/lwip/ |
D | netif.h | 45 void (*drv_send)(struct netif *netif, struct pbuf *p); \ 46 u8_t (*drv_set_hwaddr)(struct netif *netif, u8_t *addr, u8_t len); \ 47 void (*drv_config)(struct netif *netif, u32_t config_flags, u8_t setBit); \ 50 #include_next <lwip/netif.h> 70 err_t driverif_init(struct netif *netif); 71 void driverif_input(struct netif *netif, struct pbuf *p); 77 #define netif_get_name(netif) ((netif)->full_name) argument
|
D | netifapi.h | 41 err_t netifapi_dhcps_start(struct netif *netif, char *start_ip, u16_t ip_num); 42 err_t netifapi_dhcps_stop(struct netif *netif); 47 void netifapi_netif_rmv_ip6_address(struct netif *netif, ip_addr_t *ipaddr); 48 struct netif *netifapi_netif_find_by_name(const char *name);
|
D | dhcp.h | 53 #define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) \ argument 61 err_t dhcp_is_bound(struct netif *netif);
|
/kernel/liteos_m/components/net/test/ |
D | net_socket_test_011.c | 53 struct netif *btProxyNf = NULL; 56 static void ArpPackageProc(struct netif *netif, struct pbuf *p); 57 extern void driverif_input(struct netif *netif, struct pbuf *p); 58 static void ReplayArpEncodeEthernet(struct netif *netif, struct pbuf *p); 60 static void ReplayUdpEncodeEthernet(struct netif *netif, struct pbuf *p) in ReplayUdpEncodeEthernet() argument 72 driverif_input(netif, p); in ReplayUdpEncodeEthernet() 124 IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { in ReplayUdpEncodeIp() 135 IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { in ReplayUdpEncodeIp() 187 static void ParsePackageIpUdp(struct netif *netif, struct pbuf *btBuf) in ParsePackageIpUdp() argument 207 LogPrintln("netif full name %s", netif->full_name); in ParsePackageIpUdp() [all …]
|
/kernel/liteos_a/net/lwip-2.1/enhancement/include/lwip/ |
D | fixme.h | 72 #define ip_addr_isbroadcast_val(ipaddr, netif) ((IP_IS_V6_VAL(*ipaddr)) ? \ argument 74 ip4_addr_isbroadcast(ip_2_ip4(ipaddr), netif)) 97 err_t netif_dhcp_off(struct netif *netif); 99 err_t netif_do_rmv_ipv6_addr(struct netif *netif, void *arguments); 101 err_t netif_set_mtu(struct netif *netif, u16_t netif_mtu); 103 err_t netif_set_hwaddr(struct netif *netif, const unsigned char *hw_addr, int hw_len); 105 err_t etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethad… 107 err_t etharp_delete_arp_entry(struct netif *netif, ip4_addr_t *ipaddr);
|
D | dhcps.h | 64 err_t dhcps_start(struct netif *netif, const char *start_ip, u16_t ip_num); 65 void dhcps_stop(struct netif *netif);
|