Lines Matching defs:netmask
301 * @param netmask network mask for the new netif
329 const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
361 if (netmask == NULL) {
362 netmask = ip_2_ip4(IP4_ADDR_ANY);
370 ip_addr_set_zero_ip4(&netif->netmask);
433 netif_set_addr(netif, ipaddr, netmask, gw);
512 LWIP_DEBUGF(NETIF_DEBUG, (" netmask "));
513 ip4_addr_debug_print(NETIF_DEBUG, netmask);
579 * @note call netif_set_addr() if you also want to change netmask and
606 netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
609 if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
617 /* set new netmask to netif */
618 ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
619 IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4);
621 LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n",
627 return 1; /* netmask changed */
629 return 0; /* netmask unchanged */
634 * Change the netmask of a network interface
637 * @param netmask the new netmask
643 netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask)
656 if (netmask == NULL) {
657 netmask = IP4_ADDR_ANY4;
660 if (netif_do_set_netmask(netif, netmask, old_nm)) {
701 * @note call netif_set_addr() if you also want to change ip address and netmask
732 * Change IP address configuration for a network interface (including netmask
737 * @param netmask the new netmask
741 netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
764 if (netmask == NULL) {
765 netmask = IP4_ADDR_ANY4;
773 /* when removing an address, we have to remove it *before* changing netmask/gw
782 if (netif_do_set_netmask(netif, netmask, old_nm)) {
795 /* set ipaddr last to ensure netmask/gw have been set when status callback is called */