Lines Matching defs:netmask

231 /* Refer to the comments in ifconfig() on the netmask "hack" */
232 #define NETMASK_CMD "netmask"
641 * such as address, netmask, broadcast, ... is set separately. But
643 * example, setting an address without a netmask does not make sense.
645 * ifconfig(1M) syntax. The kernel then "infers" the correct netmask
650 * the netmask command first. Then use this netmask to set the
654 * Note that if the "netmask" command argument is a "+", we need
672 /* Only go thru the command list once to find the netmask. */
676 * Currently, if multiple netmask commands are specified, the
677 * last one will be used as the final netmask. So we need
895 * "+" is used as the argument to "netmask" command. Query
896 * the database on the correct netmask based on the address to
919 * syntax for setting the address, the address plus netmask, and just
920 * the netmask respectively.
930 struct sockaddr_storage netmask;
941 (void) memset(&netmask, 0, sizeof (netmask));
942 netmask.ss_family = afp->af_af;
953 sin6 = (struct sockaddr_in6 *)&netmask;
962 sin = (struct sockaddr_in *)&netmask;
972 * Just in case of funny setting of both prefix and netmask,
973 * prefix should override the netmask command.
980 * Check and see if any "netmask" command is used and perform the
983 set_mask_lifreq(&lifr, &laddr, &netmask);
1029 /* save copy of netmask to restore in case of error */
1037 * and the kernel will then assign the default (netmask has been set
1039 * using the netmask command), set the mask first, so the address will
1043 /* lifr.lifr_addr already contains netmask from set_mask_lifreq() */
1061 * Restore the netmask
1365 struct sockaddr_in netmask;
1370 if (!in_getmask(&netmask, _B_FALSE))
1372 (void) printf("Setting netmask of %s to %s\n", name,
1373 inet_ntoa(netmask.sin_addr));
1375 in_getaddr(addr, (struct sockaddr *)&netmask, NULL);
1378 (void) memcpy(&lifr.lifr_addr, &netmask, sizeof (netmask));
1385 * Parse '/<n>' as a netmask.
1806 * ifconfig le0 addif 109.106.86.130 netmask + up \
1807 * addif 109.106.86.131 netmask + up
1877 * problem is that this ioctl does not include the netmask when
1881 * the netmask if provided. Finally we set the interface address.
1896 * Check and see if any "netmask" command is used and perform the
1949 * Only set the netmask if "netmask" command is used or a prefix is
1954 * lifr.lifr_addr already contains netmask from
3226 struct sockaddr_in netmask = { AF_INET };
3282 netmask.sin_addr =
3296 (void) printf("netmask %x ", ntohl(netmask.sin_addr.s_addr));
3435 struct sockaddr_in netmask = { AF_INET };
3486 netmask.sin_addr =
3500 (void) printf(" netmask 0x%x ", ntohl(netmask.sin_addr.s_addr));
4211 * the working interface for the netmask query. If addr_set is true,
4444 "\t[ netmask <mask> ]\n"