zebra获得接口的方法

Breakpoint 2, if_create (name=0x7ffff7269c14 "ns3-device0", namelen=11) at if.c:120
120      ifp = XCALLOC (MTYPE_IF, sizeof (struct interface));
(gdb) bt
#0  if_create (name=0x7ffff7269c14 "ns3-device0", namelen=11) at if.c:120
#1  0x00007ffff48d488a in if_get_by_name (name=0x7ffff7269c14 "ns3-device0") at if.c:312
#2  0x00007ffff48be5d3 in netlink_interface (snl=0x7ffff726abf0, h=0x7ffff7269bf0) at rt_netlink.c:469
#3  0x00007ffff48be311 in netlink_parse_info (filter=0x7ffff48be4b8 <netlink_interface>, nl=0x7ffff4b1b740 <netlink_cmd>) at rt_netlink.c:392
#4  0x00007ffff48bf94c in interface_lookup_netlink () at rt_netlink.c:1055
#5  0x00007ffff48bd7f1 in interface_list () at if_netlink.c:33
#6  0x00007ffff48a6198 in main (argc=5, argv=0x660bd0) at main.c:334
#7  0x00007ffff7a06fef in ns3::DceManager::DoStartProcess (context=0x671ce0) at ../model/dce-manager.cc:283
#8  0x00007ffff7a9000c in ns3::TaskManager::Trampoline (context=0x671ea0) at ../model/task-manager.cc:274
#9  0x00007ffff7a8bfe7 in ns3::PthreadFiberManager::Run (arg=0x672040) at ../model/pthread-fiber-manager.cc:402
#10 0x000000318b2079d1 in start_thread () from /lib64/libpthread.so.0
#11 0x000000318a6e88fd in clone () from /lib64/libc.so.6
(gdb)

你可能感兴趣的:(zebra获得接口的方法)