ldp报文协商过程
1 各自发送hello报文到组播组
ldp_hello_send
-》ldp_mesg_send_udp
-》mpls_socket_udp_sendto
2 一方发起协商
3 对方回应协商
4 协商完成,建立socket连接
5 定期发送保活消息
参考:
http://wenku.baidu.com/view/6720d77aa26925c52cc5bfa3.html?re=view
发送hello的backtrace
(gdb) bt
#0 dce_sendmsg (fd=6, msg=0x7ffff0a2b1a0, flags=0) at ../model/dce-fd.cc:268
#1 0x00007ffff7a53993 in dce_sendto (fd=6, buf=0x7ffff06f2008, len=34, flags=0, to=0x7ffff0a2b460, tolen=16) at ../model/dce-fd.cc:262
#2 0x00007ffff1a553f7 in sendto () at ../model/libc-ns3.h:189
#3 0x00007ffff0733223 in mpls_socket_udp_sendto (handle=-559038737, socket=0x7ffff07024d8, buffer=0x7ffff06f2008 "", size=34, to=0x7ffff0701bf8) at impl_socket.c:504
#4 0x00007ffff075ffd9 in ldp_mesg_send_udp (g=0x7ffff0700dc8, e=0x7ffff0702098, msg=0x7ffff06e2008) at ldp_mesg.c:87
#5 0x00007ffff0753ae6 in ldp_hello_send (g=0x7ffff0700dc8, e=0x7ffff0702098) at ldp_hello.c:134
#6 0x00007ffff0755920 in ldp_if_startup (g=0x7ffff0700dc8, i=0x7ffff0701b58) at ldp_if.c:233
#7 0x00007ffff074b81f in ldp_entity_startup (g=0x7ffff0700dc8, e=0x7ffff0702098) at ldp_entity.c:160
#8 0x00007ffff074eebf in ldp_global_startup (g=0x7ffff0700dc8) at ldp_global.c:227
#9 0x00007ffff074535a in ldp_cfg_global_set (handle=0x7ffff0700dc8, g=0x7ffff0a2b640, flag=2) at ldp_cfg.c:214
#10 0x00007ffff0735a28 in ldp_startup (ldp=0x7ffff0701248) at ldp.c:32
#11 0x00007ffff0735a7b in ldp_admin_state_finish (ldp=0x7ffff0701248) at ldp.c:44
#12 0x00007ffff0736ac4 in no_ldp_disable (self=0x7ffff09d9ce0 <no_ldp_disable_cmd>, vty=0x7ffff0700718, argc=0, argv=0x7ffff0a2b8f0) at ldp_vty.c:238
#13 0x00007ffff078dedc in cmd_execute_command_real (vline=0x7ffff0700d38, filter=FILTER_STRICT, vty=0x7ffff0700718, cmd=0x0) at command.c:2669
#14 0x00007ffff078e0a0 in cmd_execute_command_strict (vline=0x7ffff0700d38, vty=0x7ffff0700718, cmd=0x0) at command.c:2761
#15 0x00007ffff078e10c in config_from_file (vty=0x7ffff0700718, fp=0x7fffdc0077b0, line_num=0x7ffff0a2ba90) at command.c:2781
#16 0x00007ffff0787cc4 in vty_read_file (confp=0x7fffdc0077b0) at vty.c:2256
#17 0x00007ffff0788291 in vty_read_config (config_file=0x66c610 "/usr/local/etc/ldpd.conf",
config_default_dir=0x7ffff09d97c0 <config_default> "/home/z/new/dce/build/etc/ldpd.conf") at vty.c:2438
#18 0x00007ffff0735790 in main (argc=5, argv=0x68eb10) at ldp_main.c:239
#19 0x00007ffff79ff3bf in ns3::DceManager::DoStartProcess (context=0x71d8e0) at ../model/dce-manager.cc:283
#20 0x00007ffff7a88b78 in ns3::TaskManager::Trampoline (context=0x67dcc0) at ../model/task-manager.cc:274
#21 0x00007ffff7a84b53 in ns3::PthreadFiberManager::Run (arg=0x71dbd0) at ../model/pthread-fiber-manager.cc:402
#22 0x000000318b2079d1 in start_thread () from /lib64/libpthread.so.0
#23 0x000000318a6e88fd in clone () from /lib64/libc.so.6
(gdb)