Home
last modified time | relevance | path

Searched refs:netif (Results 1 – 25 of 58) sorted by relevance

123

/lib/liblwip/src/core/
Dnetif.c75 struct netif *netif_list;
76 struct netif *netif_default;
81 static struct netif loop_netif;
91 netif_loopif_init(struct netif *netif) in netif_loopif_init() argument
96 NETIF_INIT_SNMP(netif, snmp_ifType_softwareLoopback, 0); in netif_loopif_init()
98 netif->name[0] = 'l'; in netif_loopif_init()
99 netif->name[1] = 'o'; in netif_loopif_init()
100 netif->output = netif_loop_output; in netif_loopif_init()
138 struct netif *
139 netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, in netif_add() argument
[all …]
Ddhcp.c104 #define DHCP_MAX_MSG_LEN(netif) (netif->mtu) argument
149 static err_t dhcp_discover(struct netif *netif);
150 static err_t dhcp_select(struct netif *netif);
151 static void dhcp_bind(struct netif *netif);
153 static err_t dhcp_decline(struct netif *netif);
155 static err_t dhcp_rebind(struct netif *netif);
156 static err_t dhcp_reboot(struct netif *netif);
163 static void dhcp_timeout(struct netif *netif);
164 static void dhcp_t1_timeout(struct netif *netif);
165 static void dhcp_t2_timeout(struct netif *netif);
[all …]
Draw.c76 raw_input(struct pbuf *p, struct netif *inp) in raw_input()
206 struct netif *netif; in raw_sendto() local
236 if ((netif = ip_route(ipaddr)) == NULL) { in raw_sendto()
248 if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(ipaddr, netif)) { in raw_sendto()
260 src_ip = &(netif->ip_addr); in raw_sendto()
266 NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); in raw_sendto()
267 err = ip_output_if (q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); in raw_sendto()
268 NETIF_SET_HWADDRHINT(netif, NULL); in raw_sendto()
/lib/liblwip/src/core/ipv4/
Dautoip.c90 #define LWIP_AUTOIP_RAND(netif) ( (((u32_t)((netif->hwaddr[5]) & 0xff) << 24) | \ argument
91 ((u32_t)((netif->hwaddr[3]) & 0xff) << 16) | \
92 ((u32_t)((netif->hwaddr[2]) & 0xff) << 8) | \
93 ((u32_t)((netif->hwaddr[4]) & 0xff))) + \
94 (netif->autoip?netif->autoip->tried_llipaddr:0))
102 #define LWIP_AUTOIP_CREATE_SEED_ADDR(netif) \ argument
103 htonl(AUTOIP_RANGE_START + ((u32_t)(((u8_t)(netif->hwaddr[4])) | \
104 ((u32_t)((u8_t)(netif->hwaddr[5]))) << 8)))
108 static void autoip_handle_arp_conflict(struct netif *netif);
111 static void autoip_create_addr(struct netif *netif, ip_addr_t *ipaddr);
[all …]
Digmp.c138 static struct igmp_group *igmp_lookup_group(struct netif *ifp, ip_addr_t *addr);
143 …tic err_t igmp_ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, struct netif *netif);
176 LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", group->netif)); in igmp_dump_group_list()
191 igmp_start(struct netif *netif) in igmp_start() argument
195 LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", netif)); in igmp_start()
197 group = igmp_lookup_group(netif, &allsystems); in igmp_start()
204 if (netif->igmp_mac_filter != NULL) { in igmp_start()
207 LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", netif)); in igmp_start()
208 netif->igmp_mac_filter(netif, &allsystems, IGMP_ADD_MAC_FILTER); in igmp_start()
223 igmp_stop(struct netif *netif) in igmp_stop() argument
[all …]
Dip.c100 struct netif *current_netif;
123 struct netif *
126 struct netif *netif; in ip_route() local
129 netif = LWIP_HOOK_IP4_ROUTE(dest); in ip_route()
130 if (netif != NULL) { in ip_route()
131 return netif; in ip_route()
136 for (netif = netif_list; netif != NULL; netif = netif->next) { in ip_route()
138 if (netif_is_up(netif)) { in ip_route()
139 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { in ip_route()
141 return netif; in ip_route()
[all …]
/lib/liblwip/src/include/lwip/
Dnetif.h102 typedef err_t (*netif_init_fn)(struct netif *netif);
109 typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
118 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
126 typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
128 typedef void (*netif_status_callback_fn)(struct netif *netif);
130 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
136 struct netif { struct
138 struct netif *next; argument
233 #define NETIF_INIT_SNMP(netif, type, speed) \ argument
235 (netif)->link_type = (type); \
[all …]
Ddhcp.h108 void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp);
110 #define dhcp_remove_struct(netif) do { (netif)->dhcp = NULL; } while(0) argument
111 void dhcp_cleanup(struct netif *netif);
113 err_t dhcp_start(struct netif *netif);
115 err_t dhcp_renew(struct netif *netif);
117 err_t dhcp_release(struct netif *netif);
119 void dhcp_stop(struct netif *netif);
121 void dhcp_inform(struct netif *netif);
123 void dhcp_network_changed(struct netif *netif);
127 void dhcp_arp_reply(struct netif *netif, ip_addr_t *addr);
Dnetifapi.h44 typedef void (*netifapi_void_fn)(struct netif *netif);
45 typedef err_t (*netifapi_errt_fn)(struct netif *netif);
52 struct netif *netif; member
76 err_t netifapi_netif_add ( struct netif *netif,
84 err_t netifapi_netif_set_addr ( struct netif *netif,
89 err_t netifapi_netif_common ( struct netif *netif,
Dsnmp.h45 struct netif;
112 void snmp_add_ifinoctets(struct netif *ni, u32_t value);
113 void snmp_inc_ifinucastpkts(struct netif *ni);
114 void snmp_inc_ifinnucastpkts(struct netif *ni);
115 void snmp_inc_ifindiscards(struct netif *ni);
116 void snmp_add_ifoutoctets(struct netif *ni, u32_t value);
117 void snmp_inc_ifoutucastpkts(struct netif *ni);
118 void snmp_inc_ifoutnucastpkts(struct netif *ni);
119 void snmp_inc_ifoutdiscards(struct netif *ni);
124 void snmp_insert_arpidx_tree(struct netif *ni, ip_addr_t *ip);
[all …]
/lib/liblwip/src/arch/
Detherif.c80 static void ethernetif_input(struct netif *netif);
91 low_level_init(struct netif *netif) in low_level_init() argument
96 netif->hwaddr_len = ETHARP_HWADDR_LEN; in low_level_init()
99 netif->hwaddr[0] = 0x11; in low_level_init()
100 netif->hwaddr[1] = 0x22; in low_level_init()
101 netif->hwaddr[2] = 0x33; in low_level_init()
102 netif->hwaddr[3] = 0x44; in low_level_init()
103 netif->hwaddr[4] = 0x55; in low_level_init()
104 netif->hwaddr[5] = 0x66; in low_level_init()
107 netif->mtu = 1500; in low_level_init()
[all …]
/lib/liblwip/src/netif/
Dethernetif.c74 static void ethernetif_input(struct netif *netif);
84 low_level_init(struct netif *netif)
86 struct ethernetif *ethernetif = netif->state;
89 netif->hwaddr_len = ETHARP_HWADDR_LEN;
92 netif->hwaddr[0] = ;
94 netif->hwaddr[5] = ;
97 netif->mtu = 1500;
101 netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
123 low_level_output(struct netif *netif, struct pbuf *p)
125 struct ethernetif *ethernetif = netif->state;
[all …]
Dslipif.c115 slipif_output(struct netif *netif, struct pbuf *p, ip_addr_t *ipaddr) in slipif_output() argument
122 LWIP_ASSERT("netif != NULL", (netif != NULL)); in slipif_output()
123 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_output()
128 …LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p… in slipif_output()
129 priv = netif->state; in slipif_output()
170 slipif_rxbyte(struct netif *netif, u8_t c) in slipif_rxbyte() argument
175 LWIP_ASSERT("netif != NULL", (netif != NULL)); in slipif_rxbyte()
176 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_rxbyte()
178 priv = netif->state; in slipif_rxbyte()
267 slipif_rxbyte_input(struct netif *netif, u8_t c) in slipif_rxbyte_input() argument
[all …]
Detharp.c114 struct netif *netif; member
135 #define ETHARP_SET_HINT(netif, hint) if (((netif) != NULL) && ((netif)->addr_hint != NULL)) \ argument
136 *((netif)->addr_hint) = (hint);
138 #define ETHARP_SET_HINT(netif, hint) (etharp_cached_entry = (hint)) argument
180 snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); in etharp_free_entry()
193 arp_table[i].netif = NULL; in etharp_free_entry()
415 etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) in etharp_send_ip() argument
420 (netif->hwaddr_len == ETHARP_HWADDR_LEN)); in etharp_send_ip()
426 return netif->linkoutput(netif, p); in etharp_send_ip()
448 etharp_update_arp_entry(struct netif *netif, ip_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flag… argument
[all …]
/lib/liblwip/src/core/ipv6/
Dip6.c74 struct netif *
77 struct netif *netif; in ip_route() local
79 for(netif = netif_list; netif != NULL; netif = netif->next) { in ip_route()
80 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { in ip_route()
81 return netif; in ip_route()
98 struct netif *netif; in ip_forward() local
102 if ((netif = ip_route((struct ip_addr *)&(iphdr->dest))) == NULL) { in ip_forward()
143 netif->output(netif, p, (struct ip_addr *)&(iphdr->dest)); in ip_forward()
157 ip_input(struct pbuf *p, struct netif *inp) { in ip_input()
159 struct netif *netif; in ip_input() local
[all …]
/lib/liblwip/src/include/netif/
Dslipif.h68 err_t slipif_init(struct netif * netif);
69 void slipif_poll(struct netif *netif);
71 void slipif_process_rxqueue(struct netif *netif);
72 void slipif_received_byte(struct netif *netif, u8_t data);
73 void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len);
Detharp.h183 s8_t etharp_find_addr(struct netif *netif, ip_addr_t *ipaddr,
185 err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr);
186 err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q);
187 err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr);
192 #define etharp_gratuitous(netif) etharp_request((netif), &(netif)->ip_addr) argument
193 void etharp_cleanup_netif(struct netif *netif);
201 err_t etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
210 err_t ethernet_input(struct pbuf *p, struct netif *netif);
Dppp_oe.h149 struct netif *sc_ethif; /* ethernet interface we are using */
174 err_t pppoe_create(struct netif *ethif, int pd, void (*linkStatusCB)(int pd, int up), struct pppoe_…
175 err_t pppoe_destroy(struct netif *ifp);
180 void pppoe_disc_input(struct netif *netif, struct pbuf *p);
181 void pppoe_data_input(struct netif *netif, struct pbuf *p);
/lib/liblwip/src/include/ipv4/lwip/
Dautoip.h95 void autoip_set_struct(struct netif *netif, struct autoip *autoip);
98 err_t autoip_start(struct netif *netif);
101 err_t autoip_stop(struct netif *netif);
104 void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr);
110 void autoip_network_changed(struct netif *netif);
Digmp.h76 struct netif *netif; member
91 err_t igmp_start(struct netif *netif);
92 err_t igmp_stop(struct netif *netif);
93 void igmp_report_groups(struct netif *netif);
94 struct igmp_group *igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr);
95 void igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest);
/lib/liblwip/src/api/
Dnetifapi.c47 if (!netif_add( msg->netif, in do_netifapi_netif_add()
67 netif_set_addr( msg->netif, in do_netifapi_netif_set_addr()
83 msg->err = msg->msg.common.errtfunc(msg->netif); in do_netifapi_netif_common()
86 msg->msg.common.voidfunc(msg->netif); in do_netifapi_netif_common()
98 netifapi_netif_add(struct netif *netif, in netifapi_netif_add() argument
108 msg.msg.netif = netif; in netifapi_netif_add()
126 netifapi_netif_set_addr(struct netif *netif, in netifapi_netif_set_addr() argument
133 msg.msg.netif = netif; in netifapi_netif_set_addr()
148 netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, in netifapi_netif_common() argument
153 msg.msg.netif = netif; in netifapi_netif_common()
/tests/
Dlwiptest.c9 static struct netif netif; variable
11 extern err_t ethernetif_init(struct netif *netif);
24 netif_add(&netif, &addr, &mask, &gw, NULL, ethernetif_init, ethernet_input); in main()
25 netif_set_default(&netif); in main()
26 netif_set_up(&netif); in main()
/lib/liblwip/test/unit/tcp/
Dtest_tcp_oos.c152 struct netif netif; in START_TEST() local
156 memset(&netif, 0, sizeof(netif)); in START_TEST()
195 test_tcp_input(p_8_9, &netif); in START_TEST()
207 test_tcp_input(p_4_8, &netif); in START_TEST()
221 test_tcp_input(p_4_10, &netif); in START_TEST()
235 test_tcp_input(p_2_14, &netif); in START_TEST()
247 test_tcp_input(p_fin, &netif); in START_TEST()
259 test_tcp_input(pinseq, &netif); in START_TEST()
292 struct netif netif; in START_TEST() local
296 memset(&netif, 0, sizeof(netif)); in START_TEST()
[all …]
Dtcp_helper.c238 void test_tcp_input(struct pbuf *p, struct netif *inp) in test_tcp_input()
254 static err_t test_tcp_netif_output(struct netif *netif, struct pbuf *p, in test_tcp_netif_output() argument
257 struct test_tcp_txcounters *txcounters = (struct test_tcp_txcounters*)netif->state; in test_tcp_netif_output()
276 void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters, in test_tcp_init_netif() argument
279 struct netif *n; in test_tcp_init_netif()
280 memset(netif, 0, sizeof(struct netif)); in test_tcp_init_netif()
282 netif->output = test_tcp_netif_output; in test_tcp_init_netif()
283 netif->state = txcounters; in test_tcp_init_netif()
284 netif->flags |= NETIF_FLAG_UP; in test_tcp_init_netif()
285 ip_addr_copy(netif->netmask, *netmask); in test_tcp_init_netif()
[all …]
/lib/liblwip/src/netif/ppp/
Dppp.c198 struct netif *ethif;
216 struct netif netif; member
604 pppoe_destroy(&pc->netif); in pppOverEthernetClose()
607 int pppOverEthernetOpen(struct netif *ethif, const char *service_name, const char *concentrator_nam… in pppOverEthernetOpen()
714 snmp_inc_ifoutdiscards(&pc->netif); in nPut()
720 snmp_add_ifoutoctets(&pc->netif, nb->tot_len); in nPut()
721 snmp_inc_ifoutucastpkts(&pc->netif); in nPut()
779 snmp_inc_ifoutdiscards(&pc->netif); in pppifOutputOverEthernet()
797 snmp_inc_ifoutdiscards(&pc->netif); in pppifOutputOverEthernet()
801 snmp_add_ifoutoctets(&pc->netif, tot_len); in pppifOutputOverEthernet()
[all …]

123