• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/zebra/zebra/

Lines Matching refs:ifp

74 if_zebra_new_hook (struct interface *ifp)
107 ifp->info = zebra_if;
113 if_zebra_delete_hook (struct interface *ifp)
115 if (ifp->info)
116 XFREE (MTYPE_TMP, ifp->info);
123 if_addr_wakeup (struct interface *ifp)
130 for (node = listhead (ifp->connected); node; nextnode (node))
141 if (! if_is_up (ifp))
143 if_set_flags (ifp, IFF_UP | IFF_RUNNING);
144 if_refresh (ifp);
147 ret = if_set_prefix (ifp, ifc);
158 zebra_interface_address_add_update (ifp, ifc);
160 if (if_is_up(ifp))
161 connected_up_ipv4 (ifp, ifc);
166 if (! if_is_up (ifp))
168 if_set_flags (ifp, IFF_UP | IFF_RUNNING);
169 if_refresh (ifp);
172 ret = if_prefix_add_ipv6 (ifp, ifc);
183 zebra_interface_address_add_update (ifp, ifc);
185 if (if_is_up(ifp))
186 connected_up_ipv6 (ifp, ifc);
195 if_add_update (struct interface *ifp)
197 zebra_interface_add_update (ifp);
199 if (! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
201 SET_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE);
203 if_addr_wakeup (ifp);
207 ifp->name, ifp->ifindex);
214 zlog_info ("interface %s index %d is added.", ifp->name, ifp->ifindex);
221 if_delete_update (struct interface *ifp)
228 if (if_is_up(ifp))
232 ifp->name, ifp->ifindex);
238 UNSET_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE);
243 ifp->name, ifp->ifindex);
247 if (ifp->connected)
249 for (node = listhead (ifp->connected); node; node = next)
256 connected_down_ipv4 (ifp, ifc);
259 connected_down_ipv6 (ifp, ifc);
262 zebra_interface_address_delete_update (ifp, ifc);
268 listnode_delete (ifp->connected, ifc);
273 zebra_interface_delete_update (ifp);
278 if_up (struct interface *ifp)
286 zebra_interface_up_update (ifp);
289 if (ifp->connected)
291 for (node = listhead (ifp->connected); node; node = next)
298 connected_up_ipv4 (ifp, ifc);
301 connected_up_ipv6 (ifp, ifc);
313 if_down (struct interface *ifp)
321 zebra_interface_down_update (ifp);
324 if (ifp->connected)
326 for (node = listhead (ifp->connected); node; node = next)
333 connected_down_ipv4 (ifp, ifc);
336 connected_down_ipv6 (ifp, ifc);
346 if_refresh (struct interface *ifp)
348 if (if_is_up (ifp))
350 if_get_flags (ifp);
351 if (! if_is_up (ifp))
352 if_down (ifp);
356 if_get_flags (ifp);
357 if (if_is_up (ifp))
358 if_up (ifp);
415 struct interface *ifp;
418 ifp = connected->ifp;
431 if (ifp->flags & IFF_BROADCAST)
437 if (ifp->flags & IFF_POINTOPOINT)
456 nd_dump_vty (struct vty *vty, struct interface *ifp)
461 zif = (struct zebra_if *) ifp->info;
486 if_dump_vty (struct vty *vty, struct interface *ifp)
494 vty_out (vty, "Interface %s%s", ifp->name,
496 if (ifp->desc)
497 vty_out (vty, " Description: %s%s", ifp->desc,
499 if (ifp->ifindex <= 0)
501 vty_out(vty, " index %d pseudo interface%s", ifp->ifindex, VTY_NEWLINE);
504 else if (! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
507 ifp->ifindex,
513 ifp->ifindex, ifp->metric, ifp->mtu);
514 if_flag_dump_vty (vty, ifp->flags);
519 sdl = &ifp->sdl;
531 if (ifp->hw_addr_len != 0)
536 for (i = 0; i < ifp->hw_addr_len; i++)
537 vty_out (vty, "%s%02x", i == 0 ? "" : ":", ifp->hw_addr[i]);
543 if (ifp->bandwidth != 0)
545 vty_out(vty, " bandwidth %u kbps", ifp->bandwidth);
549 for (node = listhead (ifp->connected); node; nextnode (node))
557 nd_dump_vty (vty, ifp);
564 ifp->stats.rx_packets, ifp->stats.rx_bytes,
565 ifp->stats.rx_dropped, ifp->stats.rx_multicast, VTY_NEWLINE);
569 ifp->stats.rx_errors, ifp->stats.rx_length_errors,
570 ifp->stats.rx_over_errors, ifp->stats.rx_crc_errors,
571 ifp->stats.rx_frame_errors, ifp->stats.rx_fifo_errors,
572 ifp->stats.rx_missed_errors, VTY_NEWLINE);
575 ifp->stats.tx_packets, ifp->stats.tx_bytes,
576 ifp->stats.tx_dropped, VTY_NEWLINE);
580 ifp->stats.tx_errors, ifp->stats.tx_aborted_errors,
581 ifp->stats.tx_carrier_errors, ifp->stats.tx_fifo_errors,
582 ifp->stats.tx_heartbeat_errors, ifp->stats.tx_window_errors,
585 vty_out (vty, " collisions %lu%s", ifp->stats.collisions, VTY_NEWLINE);
593 ifp->stats.ifi_ipackets, ifp->stats.ifi_ibytes,
594 ifp->stats.ifi_iqdrops, ifp->stats.ifi_imcasts,
598 ifp->stats.ifi_ierrors, VTY_NEWLINE);
601 ifp->stats.ifi_opackets, ifp->stats.ifi_obytes,
602 ifp->stats.ifi_omcasts, VTY_NEWLINE);
605 ifp->stats.ifi_oerrors, VTY_NEWLINE);
608 ifp->stats.ifi_collisions, VTY_NEWLINE);
613 ifp->stats.ifi_ipackets, ifp->stats.ifi_ibytes,
614 ifp->stats.ifi_iqdrops, ifp->stats.ifi_imcasts,
618 ifp->stats.ifi_ierrors, VTY_NEWLINE);
621 ifp->stats.ifi_opackets, ifp->stats.ifi_obytes,
622 ifp->stats.ifi_omcasts, VTY_NEWLINE);
625 ifp->stats.ifi_oerrors, VTY_NEWLINE);
628 ifp->stats.ifi_collisions, VTY_NEWLINE);
657 struct interface * ifp;
662 ifp = vty->index;
666 if (ifp->ifindex == 0)
668 ifp->ifindex = if_new_intern_ifindex ();
669 UNSET_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE);
681 struct interface *ifp;
683 ifp = if_lookup_by_name(argv[0]);
685 if (ifp == NULL)
693 if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
700 if_delete(ifp);
720 struct interface *ifp;
734 ifp = if_lookup_by_name (argv[0]);
735 if (ifp == NULL)
741 if_dump_vty (vty, ifp);
758 struct interface *ifp;
761 ifp = (struct interface *) vty->index;
762 ret = if_set_flags (ifp, IFF_MULTICAST);
768 if_refresh (ifp);
769 if_data = ifp->info;
782 struct interface *ifp;
785 ifp = (struct interface *) vty->index;
786 ret = if_unset_flags (ifp, IFF_MULTICAST);
792 if_refresh (ifp);
793 if_data = ifp->info;
805 struct interface *ifp;
808 ifp = (struct interface *) vty->index;
809 ret = if_unset_flags (ifp, IFF_UP);
815 if_refresh (ifp);
816 if_data = ifp->info;
829 struct interface *ifp;
832 ifp = (struct interface *) vty->index;
833 ret = if_set_flags (ifp, IFF_UP | IFF_RUNNING);
839 if_refresh (ifp);
840 if_data = ifp->info;
852 struct interface *ifp;
855 ifp = (struct interface *) vty->index;
865 ifp->bandwidth = bandwidth;
868 if (if_is_up (ifp))
869 zebra_interface_up_update (ifp);
880 struct interface *ifp;
882 ifp = (struct interface *) vty->index;
884 ifp->bandwidth = 0;
887 if (if_is_up (ifp))
888 zebra_interface_up_update (ifp);
902 ip_address_install (struct vty *vty, struct interface *ifp, char *addr_str,
918 ifc = connected_check_ipv4 (ifp, (struct prefix *) &cp);
922 ifc->ifp = ifp;
948 listnode_add (ifp->connected, ifc);
957 && CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
960 if (! if_is_up (ifp))
962 if_set_flags (ifp, IFF_UP | IFF_RUNNING);
963 if_refresh (ifp);
966 ret = if_set_prefix (ifp, ifc);
978 zebra_interface_address_add_update (ifp, ifc);
981 if (if_is_up(ifp))
982 connected_up_ipv4 (ifp, ifc);
989 ip_address_uninstall (struct vty *vty, struct interface *ifp, char *addr_str,
1005 ifc = connected_check_ipv4 (ifp, (struct prefix *) &cp);
1018 || ! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
1020 listnode_delete (ifp->connected, ifc);
1026 ret = if_unset_prefix (ifp, ifc);
1035 zebra_interface_address_delete_update (ifp, ifc);
1038 connected_down_ipv4 (ifp, ifc);
1041 listnode_delete (ifp->connected, ifc);
1120 ipv6_address_install (struct vty *vty, struct interface *ifp, char *addr_str,
1135 ifc = connected_check_ipv6 (ifp, (struct prefix *) &cp);
1139 ifc->ifp = ifp;
1155 listnode_add (ifp->connected, ifc);
1164 && CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
1167 if (! if_is_up (ifp))
1169 if_set_flags (ifp, IFF_UP | IFF_RUNNING);
1170 if_refresh (ifp);
1173 ret = if_prefix_add_ipv6 (ifp, ifc);
1186 zebra_interface_address_add_update (ifp, ifc);
1189 if (if_is_up(ifp))
1190 connected_up_ipv6 (ifp, ifc);
1197 ipv6_address_uninstall (struct vty *vty, struct interface *ifp, char *addr_str,
1213 ifc = connected_check_ipv6 (ifp, (struct prefix *) &cp);
1226 || ! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
1228 listnode_delete (ifp->connected, ifc);
1234 ret = if_prefix_delete_ipv6 (ifp, ifc);
1243 zebra_interface_address_delete_update (ifp, ifc);
1246 connected_down_ipv6 (ifp, ifc);
1249 listnode_delete (ifp->connected, ifc);
1300 struct interface *ifp;
1310 ifp = getdata (node);
1311 if_data = ifp->info;
1313 vty_out (vty, "interface %s%s", ifp->name,
1316 if (ifp->desc)
1317 vty_out (vty, " description %s%s", ifp->desc,
1322 if (ifp->bandwidth != 0)
1323 vty_out(vty, " bandwidth %u%s", ifp->bandwidth, VTY_NEWLINE);
1325 for (addrnode = listhead (ifp->connected); addrnode; nextnode (addrnode))
1358 rtadv_config_write (vty, ifp);