(gdb) bt
#0 zebra_interface_add_read (s=0x7ffff41ef6e8) at zclient.c:609
#1 0x00007ffff42d8630 in isis_zebra_if_add (command=1, zclient=0x7ffff4200428, length=59) at isis_zebra.c:71
#2 0x00007ffff4305fa1 in zclient_read (thread=0x7ffff4263cc0) at zclient.c:898
#3 0x00007ffff42f34ef in thread_call (thread=0x7ffff4263cc0) at thread.c:1177
#4 0x00007ffff42bea3d in main (argc=5, argv=0x66fae0, envp=0x654ba0) at isis_main.c:353
#5 0x00007ffff7a06fef in ns3::DceManager::DoStartProcess (context=0x675e70) at ../model/dce-manager.cc:283
#6 0x00007ffff7a902f8 in ns3::TaskManager::Trampoline (context=0x669930) at ../model/task-manager.cc:274
#7 0x00007ffff7a8c2d3 in ns3::PthreadFiberManager::Run (arg=0x678220) at ../model/pthread-fiber-manager.cc:402
#8 0x000000318b2079d1 in start_thread () from /lib64/libpthread.so.0
#9 0x000000318a6e88fd in clone () from /lib64/libc.so.6
(gdb)
接口创建
#0 if_create (name=0x7ffff7269c14 "ns3-device0", namelen=11) at if.c:120
#1 0x00007ffff48d088a in if_get_by_name (name=0x7ffff7269c14 "ns3-device0") at if.c:312
#2 0x00007ffff48ba5d3 in netlink_interface (snl=0x7ffff726abf0, h=0x7ffff7269bf0) at rt_netlink.c:469
#3 0x00007ffff48ba311 in netlink_parse_info (filter=0x7ffff48ba4b8 <netlink_interface>, nl=0x7ffff4b17740 <netlink_cmd>) at rt_netlink.c:392
#4 0x00007ffff48bb94c in interface_lookup_netlink () at rt_netlink.c:1055
#5 0x00007ffff48b97f1 in interface_list () at if_netlink.c:33
#6 0x00007ffff48a2198 in main (argc=5, argv=0x661bd0) at main.c:334
#7 0x00007ffff7a06fef in ns3::DceManager::DoStartProcess (context=0x675330) at ../model/dce-manager.cc:283
#8 0x00007ffff7a902f8 in ns3::TaskManager::Trampoline (context=0x6754f0) at ../model/task-manager.cc:274
#9 0x00007ffff7a8c2d3 in ns3::PthreadFiberManager::Run (arg=0x675690) 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)
发送的netlink请求如下,
/* Get interface information. */ ret = netlink_request (AF_PACKET, RTM_GETLINK, &netlink_cmd); if (ret < 0) return ret;
针对消息为NETLINK_RTM_GETLINK
else if (type == NETLINK_RTM_GETLINK) { nlmsg_dump = BuildInterfaceInfoDumpMessages (); }