Lines Matching refs:netif
70 /** If set, the netif has broadcast capability.
71 * Set by the netif driver in its init function. */
73 /** If set, the netif is one end of a point-to-point connection.
74 * Set by the netif driver in its init function. */
81 * Either set by the netif driver in its init function (if the link
85 /** If set, the netif is an ethernet device using ARP.
86 * Set by the netif driver in its init function.
89 /** If set, the netif is an ethernet device. It might not use
93 /** If set, the netif has IGMP capability.
94 * Set by the netif driver in its init function. */
97 /** Function prototype for netif init functions. Set up flags and output/linkoutput
100 * @param netif The netif to initialize
102 typedef err_t (*netif_init_fn)(struct netif *netif);
103 /** Function prototype for netif->input functions. This function is saved as 'input'
104 * callback function in the netif struct. Call it when a packet has been received.
107 * @param inp The netif which received the packet
109 typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
110 /** Function prototype for netif->output functions. Called by lwIP when a packet
111 * shall be sent. For ethernet netif, set this to 'etharp_output' and set
114 * @param netif The netif which shall send a packet
118 typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
120 /** Function prototype for netif->linkoutput functions. Only used for ethernet
123 * @param netif The netif which shall send a packet
126 typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
127 /** Function prototype for netif status- or link-callback functions. */
128 typedef void (*netif_status_callback_fn)(struct netif *netif);
129 /** Function prototype for netif igmp_mac_filter functions */
130 typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
136 struct netif {
138 struct netif *next;
157 /** This function is called when the netif state is set to up or down
162 /** This function is called when the netif link is set to up or down
167 /** This function is called when the netif has been removed */
174 /** the DHCP client state information for this netif */
178 /** the AutoIP client state information for this netif */
182 /* the hostname for this netif, NULL is a valid value */
233 #define NETIF_INIT_SNMP(netif, type, speed) \
235 (netif)->link_type = (type); \
237 (netif)->link_speed = (speed); \
238 (netif)->ts = 0; \
239 (netif)->ifinoctets = 0; \
240 (netif)->ifinucastpkts = 0; \
241 (netif)->ifinnucastpkts = 0; \
242 (netif)->ifindiscards = 0; \
243 (netif)->ifoutoctets = 0; \
244 (netif)->ifoutucastpkts = 0; \
245 (netif)->ifoutnucastpkts = 0; \
246 (netif)->ifoutdiscards = 0
248 #define NETIF_INIT_SNMP(netif, type, speed)
253 extern struct netif *netif_list;
255 extern struct netif *netif_default;
259 struct netif *netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask,
263 netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask,
265 void netif_remove(struct netif * netif);
269 netif structure, and the digit is in the num field in the same
271 struct netif *netif_find(char *name);
273 void netif_set_default(struct netif *netif);
275 void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr);
276 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask);
277 void netif_set_gw(struct netif *netif, ip_addr_t *gw);
279 void netif_set_up(struct netif *netif);
280 void netif_set_down(struct netif *netif);
282 #define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
285 void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback);
288 void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback);
291 void netif_set_link_up(struct netif *netif);
292 void netif_set_link_down(struct netif *netif);
294 #define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0)
297 void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback);
301 #define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0)
302 #define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL)
306 #define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0)
307 #define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL)
311 err_t netif_loop_output(struct netif *netif, struct pbuf *p, ip_addr_t *dest_ip);
312 void netif_poll(struct netif *netif);
319 #define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint))
321 #define NETIF_SET_HWADDRHINT(netif, hint)