Enhance the bbmd registration for demos.
This commit is contained in:
@@ -228,8 +228,8 @@ int main(
|
||||
if (bbmd_address) {
|
||||
struct in_addr addr;
|
||||
addr.s_addr = bbmd_address;
|
||||
printf("WhoIs: Registering with BBMD at %s:%ld\n",
|
||||
inet_ntoa(addr),bbmd_port);
|
||||
printf("WhoIs: Registering with BBMD at %s:%ld for %ld seconds\n",
|
||||
inet_ntoa(addr),bbmd_port, bbmd_timetolive_seconds);
|
||||
bvlc_register_with_bbmd(
|
||||
bbmd_address,
|
||||
bbmd_port,
|
||||
|
||||
@@ -760,10 +760,18 @@ void bvlc_register_with_bbmd(
|
||||
|
||||
dest.sin_addr.s_addr = bbmd_address;
|
||||
dest.sin_port = htons(bbmd_port);
|
||||
/* In order for their broadcasts to get here,
|
||||
we need to register our address with the remote BBMD using
|
||||
Write Broadcast Distribution Table, or
|
||||
register with the BBMD as a Foreign Device */
|
||||
mtu_len = bvlc_encode_register_foreign_device(
|
||||
&mtu[0],
|
||||
time_to_live_seconds);
|
||||
bvlc_send_mpdu(&dest, &mtu[0], mtu_len);
|
||||
/* In order for our broadcasts to get there,
|
||||
we have to put this BBMD into my BBMD table
|
||||
or register it as a foreign device in my FDT. */
|
||||
bvlc_register_foreign_device(&dest, time_to_live_seconds);
|
||||
}
|
||||
|
||||
void bvlc_send_result(
|
||||
|
||||
Reference in New Issue
Block a user