Lines Matching refs:ifs
1031 struct interface ifs, *ifp, *ifp1;
1127 (void) memset(&ifs, 0, sizeof (ifs));
1129 (void) strlcpy(ifs.int_name, lifrp->lifr_name,
1130 sizeof (ifs.int_name));
1133 ifs.int_addr = ((struct sockaddr_in *)&lifrp->lifr_addr)->
1140 ifs.int_name, rip_strerror(errno));
1142 ifs.int_if_flags = 0;
1144 ifs.int_if_flags = lifrp->lifr_flags;
1147 if (IN_CLASSD(ntohl(ifs.int_addr)) ||
1148 (ntohl(ifs.int_addr) & IN_CLASSA_NET) == 0) {
1149 if (IS_IFF_UP(ifs.int_if_flags)) {
1153 ifs.int_name,
1154 naddr_ntoa(ifs.int_addr));
1161 if (IN_LINKLOCAL(ntohl(ifs.int_addr)))
1167 ifs.int_if_flags &= ~IFF_UP;
1170 ifs.int_name, rip_strerror(errno));
1180 if (ifs.int_if_flags & IFF_POINTOPOINT) {
1183 if (IS_IFF_UP(ifs.int_if_flags)) {
1188 ifs.int_name,
1194 ifs.int_net = ntohl(sinp->sin_addr.s_addr);
1195 if (IN_CLASSD(ntohl(ifs.int_net)) ||
1196 (ifs.int_net != 0 &&
1197 (ifs.int_net & IN_CLASSA_NET) == 0)) {
1198 if (IS_IFF_UP(ifs.int_if_flags)) {
1203 ifs.int_name,
1204 naddr_ntoa(ifs.int_net));
1209 ifs.int_dstaddr = sinp->sin_addr.s_addr;
1215 if (IS_IFF_UP(ifs.int_if_flags)) {
1219 ifs.int_name, rip_strerror(errno));
1225 if (!(ifs.int_if_flags &
1227 if (IS_IFF_UP(ifs.int_if_flags)) {
1231 ifs.int_name);
1236 ifs.int_mask = IP_HOST_MASK;
1238 ifs.int_mask = ntohl(sinp->sin_addr.s_addr);
1245 if (ifs.int_if_flags & IFF_BROADCAST) {
1247 if (IS_IFF_UP(ifs.int_if_flags)) {
1252 ifs.int_name,
1261 if (IS_IFF_UP(ifs.int_if_flags)) {
1266 ifs.int_name,
1273 ifs.int_brdaddr = sinp->sin_addr.s_addr;
1277 if (IS_IFF_UP(ifs.int_if_flags)) {
1281 ifs.int_name, rip_strerror(errno));
1285 ifs.int_metric = lifrp->lifr_metric;
1286 if (ifs.int_metric > HOPCNT_INFINITY) {
1287 if (IS_IFF_UP(ifs.int_if_flags)) {
1293 ifs.int_name,
1294 ifs.int_metric,
1298 ifs.int_metric = HOPCNT_INFINITY;
1302 ifs.int_state |= IS_CHECKED;
1303 ifs.int_query_time = NEVER;
1310 if (strchr(ifs.int_name, ':') != NULL)
1311 ifs.int_state |= IS_ALIAS;
1313 if (ifs.int_if_flags & IFF_LOOPBACK) {
1314 ifs.int_state |= IS_PASSIVE | IS_NO_RIP | IS_NO_RDISC;
1315 ifs.int_dstaddr = ifs.int_addr;
1316 ifs.int_mask = HOST_MASK;
1317 ifs.int_ripv1_mask = HOST_MASK;
1318 ifs.int_std_mask = std_mask(ifs.int_dstaddr);
1319 ifs.int_net = ntohl(ifs.int_dstaddr);
1322 loopaddr = ifs.int_addr;
1327 } else if (ifs.int_if_flags & IFF_POINTOPOINT) {
1328 ifs.int_ripv1_mask = ifs.int_mask;
1329 ifs.int_mask = HOST_MASK;
1330 ifs.int_std_mask = std_mask(ifs.int_dstaddr);
1333 ifs.int_dstaddr = ifs.int_addr;
1334 ifs.int_ripv1_mask = ifs.int_mask;
1335 ifs.int_std_mask = std_mask(ifs.int_addr);
1336 ifs.int_net = ntohl(ifs.int_addr) & ifs.int_mask;
1337 if (ifs.int_mask != ifs.int_std_mask)
1338 ifs.int_state |= IS_SUBNET;
1340 ifs.int_std_net = ifs.int_net & ifs.int_std_mask;
1341 ifs.int_std_addr = htonl(ifs.int_std_net);
1348 ifp = check_dup(ifs.int_name, ifs.int_addr, ifs.int_dstaddr,
1349 ifs.int_mask, ifs.int_if_flags, _B_FALSE);
1352 ifs.int_name,
1353 addrname(ifs.int_addr, ifs.int_mask, 1),
1354 ((ifs.int_if_flags & IFF_POINTOPOINT) ?
1356 ((ifs.int_if_flags & IFF_POINTOPOINT) ?
1357 naddr_ntoa(ifs.int_dstaddr) : ""),
1364 ifs.int_state |= IS_DUP;
1366 ifs.int_state &= ~IS_DUP;
1376 ifp = ifwithname(ifs.int_name);
1380 (ifs.int_state & IS_DUP);
1385 0 != ((ifp->int_if_flags ^ ifs.int_if_flags)
1389 ifp->int_addr != ifs.int_addr ||
1390 ifp->int_brdaddr != ifs.int_brdaddr ||
1391 ifp->int_dstaddr != ifs.int_dstaddr ||
1392 ifp->int_mask != ifs.int_mask ||
1393 ifp->int_metric != ifs.int_metric) {
1407 if (!IS_IFF_UP(ifs.int_if_flags)) {
1520 if (!IS_IFF_UP(ifs.int_if_flags))
1523 if (0 == (ifs.int_if_flags & (IFF_POINTOPOINT |
1525 !(ifs.int_state & IS_PASSIVE)) {
1529 ifs.int_name);
1531 if (!(ifs.int_if_flags & IFF_MULTICAST))
1532 ifs.int_state |= IS_NO_RDISC;
1540 (void) memcpy(ifp, &ifs, sizeof (*ifp));