Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: dkushner99@xxxxxxxxx
- Date: Wed, 22 Aug 2007 16:42:48 -0700
On Aug 22, 4:16 pm, dkushne...@xxxxxxxxx wrote:
On Aug 22, 3:47 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Aug 23, 12:34 am, dkushne...@xxxxxxxxx wrote:
Alex,
Is this what you want. I'm at5tached to the process for the script. I
see everything except RX. There is a router sending to 224.0.0.2 on
the wire. I see the packets with my sniffer on the same interface but
the script RX handler is still not called.
Yes !
select(7, [0 3 4 5 6], [], [], {4, 999569}) = 0 (Timeout)
This one shows you that despite handlers on the five descriptors (one
of which is no doubt the proper UDP socket), the select() is only
unlocked by its 5-second timeout (your [after 5000]).
This means that it is definitely a join issue. Can you please post the
code with the join, and also the strace output when it is doing the
join ?
-Alex
Here's a quick dump. I can see some calls to set up multicast.
Let me know what yopu think.
- Daniel
read(4, "## LDP-SimTool\r\n## FILE: This fi"..., 4096) = 4096
read(4, " }\r\n \"udp-hello\"\t\t{tr"..., 4096) = 4096
read(4, " }\r\n }\r\n }\r\n "..., 4096) = 4096
read(4, "- fr-session-params\"\r\n puts \"-"..., 4096) = 4096
read(4, "s. The last two octets identify "..., 4096) = 4096
read(4, "+-+-+-+-+-+-+\r\n## | "..., 4096) = 4096
read(4, "\r\n## +-+-+-+-+-+-+-+-+-+-+-+-+-+"..., 4096) = 4096
read(4, " | Messa"..., 4096) = 4096
read(4, "d Numbers October 1994\r\n## ADDRE"..., 4096) = 1271
read(4, "", 4096) = 0
close(4) = 0
write(1, "Loading: ldp-simtool-help-tlv.tc"..., 39) = 39
stat64("/home/dkushner/dev/scripts/LDP-SimTool/ldp-simtool-cept-
if.tcl", {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
open("/home/dkushner/dev/scripts/LDP-SimTool/ldp-simtool-cept-if.tcl",
O_RDONLY) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
read(4, "##\n## CEP\n##\n###################"..., 4096) = 508
read(4, "", 4096) = 0
close(4) = 0
write(1, "Loading: ldp-simtool-cept-if.tcl"..., 38) = 38
pipe([4, 5]) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
gettimeofday({1187823920, 392754}, NULL) = 0
getpid() = 22719
lstat64("/tmp/filegBHTRc", 0xbfe87e5c) = -1 ENOENT (No such file or
directory)
open("/tmp/filegBHTRc", O_RDWR|O_CREAT|O_TRUNC, 0666) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
unlink("/tmp/filegBHTRc") = 0
pipe([7, 8]) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0x24e868) = 22721
close(8) = 0
read(7, "", 223) = 0
close(7) = 0
close(5) = 0
read(4, "eth0 Link encap:Ethernet H"..., 4096) = 1024
read(4, "TX bytes:24461069 (23.3 MiB)\n "..., 4096) = 718
read(4, "", 4096) = 0
close(4) = 0
waitpid(22721, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 22721
--- SIGCHLD (Child exited) @ 0 (0) ---
lseek(6, 0, SEEK_SET) = 0
read(6, "", 4096) = 0
close(6) = 0
gettimeofday({1187823920, 402094}, {420, 0}) = 0
gettimeofday({1187823920, 402176}, {420, 0}) = 0
write(1, "INFO 0:0:0:0 Adding interfac"..., 86) = 86
write(1, "DEBUG: Creating CEP on interface"..., 52) = 52
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("172.24.217.91")}, 16) = 0
connect(4, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 0
setsockopt(4, SOL_IP, IP_MULTICAST_IF, [1540954284], 4) = 0
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(4, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\0\0\0\0", 8) = 0
getsockopt(4, SOL_IP, IP_MULTICAST_IF, [1540954284], [4]) = 0
write(1, "Listening on udp port: 172.24.21"..., 37) = 37
write(1, "Interface: 172.24.217.91 (cep4) "..., 71) = 71
gettimeofday({1187823920, 404136}, {420, 0}) = 0
write(1, "INFO 0:0:0:2 Adding interfac"..., 81) = 81
write(1, "DEBUG: Creating CEP on interface"..., 47) = 47
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(5, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("26.0.0.2")}, 16) = 0
connect(5, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 0
setsockopt(5, SOL_IP, IP_MULTICAST_IF, [33554458], 4) = 0
fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(5, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\0\0\0\0", 8) = 0
getsockopt(5, SOL_IP, IP_MULTICAST_IF, [33554458], [4]) = 0
write(1, "Listening on udp port: 26.0.0.2\n", 32) = 32
write(1, "Interface: 26.0.0.2 (cep5) set u"..., 66) = 66
gettimeofday({1187823920, 433119}, {420, 0}) = 0
write(1, "INFO 0:0:0:31 Adding interfac"..., 83) = 83
write(1, "DEBUG: Creating CEP on interface"..., 47) = 47
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(6, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("26.0.0.3")}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 0
setsockopt(6, SOL_IP, IP_MULTICAST_IF, [50331674], 4) = 0
fcntl64(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(6, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\0\0\0\0", 8) = 0
getsockopt(6, SOL_IP, IP_MULTICAST_IF, [50331674], [4]) = 0
write(1, "Listening on udp port: 26.0.0.3\n", 32) = 32
write(1, "Interface: 26.0.0.3 (cep6) set u"..., 66) = 66
gettimeofday({1187823920, 434517}, {420, 0}) = 0
write(1, "INFO 0:0:0:32 Attempting to c"..., 67) = 67
gettimeofday({1187823920, 435353}, {420, 0}) = 0
write(1, "INFO 0:0:0:33 Initializing PD"..., 83) = 83
brk(0x9cb4000) = 0x9cb4000
brk(0x9cec000) = 0x9cec000
brk(0x9d0d000) = 0x9d0d000
gettimeofday({1187823920, 439909}, {420, 0}) = 0
write(1, "INFO 0:0:0:37 Configuring UDP"..., 89) = 89
gettimeofday({1187823920, 440650}, {420, 0}) = 0
write(1, "INFO 0:0:0:38 Configuring UDP"..., 102) = 102
gettimeofday({1187823920, 441619}, {420, 0}) = 0
write(1, "INFO 0:0:0:39 Configuring UDP"..., 92) = 92
brk(0x9d30000) = 0x9d30000
gettimeofday({1187823920, 444674}, {420, 0}) = 0
write(1, "INFO 0:0:0:42 Configuring UDP"..., 73) = 73
gettimeofday({1187823920, 447668}, {420, 0}) = 0
write(1, "INFO 0:0:0:45 Configuring UDP"..., 95) = 95
gettimeofday({1187823920, 448555}, {420, 0}) = 0
write(1, "INFO 0:0:0:46 Configuring UDP"..., 82) = 82
gettimeofday({1187823920, 449302}, {420, 0}) = 0
brk(0x9d51000) = 0x9d51000
write(1, "INFO 0:0:0:47 Configuring UDP"..., 95) = 95
gettimeofday({1187823920, 452392}, {420, 0}) = 0
write(1, "INFO 0:0:0:50 Configuring UDP"..., 79) = 79
gettimeofday({1187823920, 453025}, {420, 0}) = 0
write(1, "INFO 0:0:0:51 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 454747}, {420, 0}) = 0
write(1, "INFO 0:0:0:52 Configuring UDP"..., 81) = 81
gettimeofday({1187823920, 457665}, {420, 0}) = 0
write(1, "INFO 0:0:0:55 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 458467}, {420, 0}) = 0
write(1, "INFO 0:0:0:56 Configuring UDP"..., 83) = 83
gettimeofday({1187823920, 459226}, {420, 0}) = 0
write(1, "INFO 0:0:0:57 Configuring UDP"..., 92) = 92
brk(0x9d74000) = 0x9d74000
gettimeofday({1187823920, 462138}, {420, 0}) = 0
write(1, "INFO 0:0:0:60 Configuring UDP"..., 79) = 79
gettimeofday({1187823920, 462887}, {420, 0}) = 0
write(1, "INFO 0:0:0:60 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 466808}, {420, 0}) = 0
write(1, "INFO 0:0:0:64 Configuring UDP"..., 87) = 87
gettimeofday({1187823920, 468669}, {420, 0}) = 0
write(1, "INFO 0:0:0:66 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 469558}, {420, 0}) = 0
write(1, "INFO 0:0:0:67 Configuring UDP"..., 83) = 83
gettimeofday({1187823920, 494343}, {420, 0}) = 0
brk(0x9d95000) = 0x9d95000
write(1, "INFO 0:0:0:92 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 495429}, {420, 0}) = 0
write(1, "INFO 0:0:0:93 Configuring UDP"..., 76) = 76
gettimeofday({1187823920, 496415}, {420, 0}) = 0
write(1, "INFO 0:0:0:94 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 497387}, {420, 0}) = 0
write(1, "INFO 0:0:0:95 Configuring UDP"..., 85) = 85
gettimeofday({1187823920, 498205}, {420, 0}) = 0
write(1, "INFO 0:0:0:96 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 501308}, {420, 0}) = 0
brk(0x9db6000) = 0x9db6000
write(1, "INFO 0:0:0:99 Configuring UDP"..., 82) = 82
gettimeofday({1187823920, 504772}, {420, 0}) = 0
write(1, "INFO 0:0:0:102 Configuring UDP"..., 95) = 95
gettimeofday({1187823920, 505809}, {420, 0}) = 0
write(1, "INFO 0:0:0:103 Configuring UDP"..., 99) = 99
gettimeofday({1187823920, 506886}, {420, 0}) = 0
write(1, "INFO 0:0:0:104 Configuring UDP"..., 92) = 92
gettimeofday({1187823920, 511453}, {420, 0}) = 0
write(1, "INFO 0:0:0:109 Configuring UDP"..., 91) = 91
brk(0x9dd8000) = 0x9dd8000
gettimeofday({1187823920, 513000}, {420, 0}) = 0
write(1, "INFO 0:0:0:111 Configuring UDP"..., 88) = 88
gettimeofday({1187823920, 513823}, {420, 0}) = 0
write(1, "INFO 0:0:0:111 Configuring UDP"..., 96) = 96
gettimeofday({1187823920, 517962}, {420, 0}) = 0
write(1, "INFO 0:0:0:115 Configuring UDP"..., 84) = 84
gettimeofday({1187823920, 518785}, {420, 0}) = 0
write(1, "INFO 0:0:0:116 Configuring UDP"..., 80) = 80
gettimeofday({1187823920, 519563}, {420, 0}) = 0
write(1, "INFO 0:0:0:117 Configuring UDP"..., 81) = 81
gettimeofday({1187823920, 523165}, {420, 0}) = 0
write(1, "INFO 0:0:0:121 Configuring UDP"..., 90) = 90
gettimeofday({1187823920, 525986}, {420, 0}) = 0
write(1, "INFO 0:0:0:123 Configuring UDP"..., 73) = 73
gettimeofday({1187823920, 526797}, {420, 0}) = 0
write(1, "INFO 0:0:0:124 Initializing LD"..., 72) = 72
gettimeofday({1187823920, 527581}, {420, 0}) = 0
write(1, "INFO 0:0:0:125 Adding Interfac"..., 91) = 91
gettimeofday({1187823920, 530854}, {420, 0}) = 0
write(1, "INFO 0:0:0:128 Starting UDP He"..., 106) = 106
gettimeofday({1187823920, 532383}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:130 DEBUG: Init-In"..., 79) = 79
gettimeofday({1187823920, 534838}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:132 DEBUG: COMMON-"..., 75) = 75
gettimeofday({1187823920, 535076}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:133 DEBUG: COMMON-"..., 63) = 63
gettimeofday({1187823920, 535287}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:133 DEBUG: COMMON-"..., 66) = 66
gettimeofday({1187823920, 535503}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:133 DEBUG: COMMON-"..., 75) = 75
gettimeofday({1187823920, 535724}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:133 DEBUG: Init-In"..., 82) = 82
gettimeofday({1187823920, 535933}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:133 DEBUG: IPv4-Tr"..., 78) = 78
gettimeofday({1187823920, 536144}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:134 DEBUG: IPv4-Tr"..., 66) = 66
gettimeofday({1187823920, 536443}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:134 DEBUG: IPv4-Tr"..., 92) = 92
gettimeofday({1187823920, 539711}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:137 Length: 00 1e "..., 46) = 46
gettimeofday({1187823920, 540005}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:138 Version: 00 01"..., 33) = 33
gettimeofday({1187823920, 540245}, {420, 0}) = 0
write(1, "DEBUG 0:0:0:138 LDP-ID: 1a 00 "..., 42) = 42
gettimeofday({1187823920, 540638}, {420, 0}) = 0
write(1, "INFO 0:0:0:138 ::ldpSimTool::l"..., 79) = 79
write(1, "TX: Sending UDP packet \"0001001e"..., 98) = 98
sendto(5,
"\0\1\0\36\32\0\0\2\0\0\1\0\0\24\0\0\0\1\4\0\0\4\0\0\0\0\4\1\0\4\32\0"...,
34, 0, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 34
gettimeofday({1187823920, 554852}, {420, 0}) = 0
write(1, "", 0) = 0
select(7, [3 4 5 6], [], [], {0, 0}) = 0 (Timeout)
gettimeofday({1187823920, 573900}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {0, 0}) = 0 (Timeout)
gettimeofday({1187823920, 574053}, {420, 0}) = 0
write(3,
"\1\30\16\0\3\0\340\1;\0\0\0\0\0\0\0\1\0\1\0\0\0\1\0\"\0\0\0\32h
\0\0"..., 308) = 308
read(3, 0xbfe88990, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3,
"\34.\32\0\4\0\340\1\'\0\0\0\276\245\322\217\0\0\0\0\2\0\0\0\0\0\0\0\4\0\340\1",
32) = 32
read(3, "\34.\33\0\4\0\340\1C
\0\0\0\276\245\322\217\0\0\0\0\2\0\0\0\0\0\0\0\4\0\340\1", 32) = 32
read(3, "\34.\34\0\4\0\340\1#
\0\0\0\276\245\322\217\0\0\0\0\2\0\0\0\0\0\0\0\4\0\340\1", 32) = 32
read(3, "\1\225\35\0\0\0\0\0\242\0\0\0\0\0\0\0\0\0\0 H\234\257\n
\0\0\0\0\330\371\235\277", 32) = 32
write(3, "\20\0\5\0\f\0\340\1WM_PROTOCOLS", 20) = 20
read(3, 0xbfe88980, 32) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(3,
"\1\225\36\0\0\0\0\0\244\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\371\235\277",
32) = 32
write(3, "\22\0\7\0\4\0\340\1\244\0\0\0\4\0\0\0 OLS
\1\0\0\0\242\0\0\0", 28) = 28
gettimeofday({1187823920, 575244}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {0, 0}) = 0 (Timeout)
gettimeofday({1187823920, 575361}, {420, 0}) = 0
gettimeofday({1187823920, 575418}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 979434}) = 1 (in [3], left {4,
979434})
gettimeofday({1187823920, 575615}, {420, 0}) = 0
ioctl(3, FIONREAD, [32]) = 0
read(3,
"\34.\37\0\4\0\340\1\244\0\0\0\277\245\322\217\0\0\0\0\2\0\0\0\0\0\0\0\4\0\340\1",
32) = 32
gettimeofday({1187823920, 575829}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 979023}) = 0 (Timeout)
gettimeofday({1187823925, 555864}, {420, 0}) = 0
gettimeofday({1187823925, 555991}, {420, 0}) = 0
gettimeofday({1187823925, 556205}, {420, 0}) = 0
write(1, "INFO 0:0:5:154 ::ldpSimTool::l"..., 79) = 79
write(1, "TX: Sending UDP packet \"0001001e"..., 98) = 98
sendto(5,
"\0\1\0\36\32\0\0\2\0\0\1\0\0\24\0\0\0\1\4\0\0\4\0\0\0\0\4\1\0\4\32\0"...,
34, 0, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 34
gettimeofday({1187823925, 561872}, {420, 0}) = 0
gettimeofday({1187823925, 561996}, {420, 0}) = 0
gettimeofday({1187823925, 562132}, {420, 0}) = 0
gettimeofday({1187823925, 562257}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 999615}) = 0 (Timeout)
gettimeofday({1187823930, 561868}, {420, 0}) = 0
gettimeofday({1187823930, 561997}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {0, 0}) = 0 (Timeout)
gettimeofday({1187823930, 562254}, {420, 0}) = 0
gettimeofday({1187823930, 562375}, {420, 0}) = 0
gettimeofday({1187823930, 562593}, {420, 0}) = 0
write(1, "INFO 0:0:10:160 ::ldpSimTool::l"..., 79) = 79
write(1, "TX: Sending UDP packet \"0001001e"..., 98) = 98
sendto(5,
"\0\1\0\36\32\0\0\2\0\0\1\0\0\24\0\0\0\1\4\0\0\4\0\0\0\0\4\1\0\4\32\0"...,
34, 0, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 34
gettimeofday({1187823930, 564411}, {420, 0}) = 0
gettimeofday({1187823930, 564532}, {420, 0}) = 0
gettimeofday({1187823930, 564675}, {420, 0}) = 0
gettimeofday({1187823930, 564800}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 999611}) = 0 (Timeout)
gettimeofday({1187823935, 570851}, {420, 0}) = 0
gettimeofday({1187823935, 570974}, {420, 0}) = 0
gettimeofday({1187823935, 571185}, {420, 0}) = 0
write(1, "INFO 0:0:15:169 ::ldpSimTool::l"..., 79) = 79
write(1, "TX: Sending UDP packet \"0001001e"..., 98) = 98
sendto(5,
"\0\1\0\36\32\0\0\2\0\0\1\0\0\24\0\0\0\1\4\0\0\4\0\0\0\0\4\1\0\4\32\0"...,
34, 0, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 34
gettimeofday({1187823935, 572982}, {420, 0}) = 0
gettimeofday({1187823935, 573098}, {420, 0}) = 0
gettimeofday({1187823935, 573227}, {420, 0}) = 0
gettimeofday({1187823935, 573346}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 999636}) = 0 (Timeout)
gettimeofday({1187823940, 576830}, {420, 0}) = 0
gettimeofday({1187823940, 576954}, {420, 0}) = 0
gettimeofday({1187823940, 577163}, {420, 0}) = 0
write(1, "INFO 0:0:20:175 ::ldpSimTool::l"..., 79) = 79
write(1, "TX: Sending UDP packet \"0001001e"..., 98) = 98
sendto(5,
"\0\1\0\36\32\0\0\2\0\0\1\0\0\24\0\0\0\1\4\0\0\4\0\0\0\0\4\1\0\4\32\0"...,
34, 0, {sa_family=AF_INET, sin_port=htons(646),
sin_addr=inet_addr("224.0.0.2")}, 16) = 34
gettimeofday({1187823940, 578716}, {420, 0}) = 0
gettimeofday({1187823940, 578912}, {420, 0}) = 0
gettimeofday({1187823940, 579046}, {420, 0}) = 0
gettimeofday({1187823940, 579171}, {420, 0}) = 0
select(7, [3 4 5 6], [], [], {4, 999545} <unfinished ...>
[root@castlerock LDP-SimTool]# l
Alex, I forgot to include the TCL code ... (this is the related GUTs):
proc udpEventHandler { sock interface } {
global testerIp localIf
puts "DEBUG: RX Handler called!"
set pkt [read $sock]
binary scan $pkt "H*" datapacket
set peer [fconfigure $sock -peer]
## If peer is ME, throw it away!
foreach idx [array names testerIp] {
if {"$peer" == "$testerIp($idx) 646"} {
puts "DEBUG: RX from myself - Throwing it away!"
return
}
}
puts "RX $peer: [string length $datapacket] {$datapacket}"
decodePdu $datapacket RX $interface
return
}
proc createUdpCep { localIp } {
puts "DEBUG: Creating CEP on interface: $localIp ..."
set cepHandle [cep -type datagram -protocol 17 -myaddr $localIp -
myport 646 -noresolve 224.0.0.2 646]
return $cepHandle
}
proc udpStart { interface } {
global srv testerIp
## CEPtcl
set srv($interface) [::ldpSimTool::createUdpCep $interface] ;#
CEPTCL Package
fconfigure $srv($interface) -maddr $interface -buffering none -
translation {auto auto} -blocking 0
fileevent $srv($interface) readable [list udpEventHandler
$srv($interface) $interface]
fconfigure $srv($interface) -join 224.0.0.2
puts "Listening on udp port: [fconfigure $srv($interface) -
maddr]"
puts "Interface: $interface \($srv($interface)\) set up for
Transmit and Receive of UDP"
return $srv($interface)
}
proc sendUdpCep { cepHandle datapacket } {
set formattedDatapacket [binary format H* $datapacket]
puts "TX: Sending UDP packet \"$datapacket\" ..."
# decodePdu $datapacket TX
sendto $cepHandle 224.0.0.2 646 "$formattedDatapacket"
}
############
## Called by instanceInit proc
proc startUdpHelloCallback { instance interface } {
global helloDb helloTime
## HELLO-DB
set helloDb($instance,$interface) "ACTIVE" ;# CLI show hello DB
## Create instance UDP-Hello
set message [$instance CreateUdpHelloMsg]
set pdu [$instance AddLdpHeader $message]
## Now start the callback
## callback should optionally rebuild the hello to use dynamic
changes
## Need to check link or Targeted for default setting
set holdTime [$instance GetUdpHelloVar hold-time]
set tBit [$instance GetUdpHelloVar t-bit]
if {$tBit} {
if {[hexToDec $holdTime] == "0"} {
set helloTime($instance,$interface) 15000
} else {
set helloTime($instance,$interface) [expr [hexToDec
$holdTime] / 3]000
}
} else {
if {[hexToDec $holdTime] == "0"} {
set helloTime($instance,$interface) 5000
} else {
set helloTime($instance,$interface) [expr [hexToDec
$holdTime] / 3]000
}
}
::ldpSimTool::sendUdpHelloCallback $instance $interface $pdu
}
## UDP-SEND CALLBACK
## ADD: per instance/per port
## Key on instance name, check that it still exists, etc
########################################################################
proc sendUdpHelloCallback { instance interface { pdu ""} } {
global srv helloDb helloTime udpHelloCb
## ABORT callback - instance delete
catch {set ns [$instance info class]} ns
if {$ns != "::ldpSimTool::ldpInstance"} {return}
## Send UDP-HELLO
trace_log consoleonly INFO "$instance: Sending UDP-HELLO, Hello-
time: $helloTime($instance,$interface) ..."
::ldpSimTool::sendUdpCep $srv($interface) $pdu ;# CEPtcl
set udpHelloCb($instance,$interface) [after $helloTime($instance,
$interface) [list ::ldpSimTool::sendUdpHelloCallback $instance
$interface $pdu]]
}
.
- Follow-Ups:
- References:
- CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: dkushner99
- Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: Alexandre Ferrieux
- Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: dkushner99
- Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: Alexandre Ferrieux
- Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- From: dkushner99
- CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- Prev by Date: Re: What's the most important thing lacking in your Tcl toolbox?
- Next by Date: Re: Env variable change
- Previous by thread: Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- Next by thread: Re: CEPTCL: Doesn't RX multicast, has anyone seen it work before?
- Index(es):
Relevant Pages
|