Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'd like to get PLATFORM and DUPLEX added to the "batch" mode (-b option to ladvdc) #26

Open
quakec opened this issue Feb 17, 2017 · 5 comments

Comments

@quakec
Copy link

quakec commented Feb 17, 2017

I've modified output as below, created defs in the headers and also added code to cdp.c to add the values to the struct msg. At runtime I get no output what so ever when I run 'ladvdc -b eth0'.
I'm new to Cpp and was hoping you could point me in the right direction.

printf("INTERFACE_%u='%s'\n", count, STR(msg->name));
printf("HOSTNAME_%u='%s'\n", count, STR(peer_host));
printf("PLATFORM_%u='%s'\n", count, STR(peer_platform));
printf("PORTNAME_%u='%s'\n", count, STR(peer_portname));
printf("PORTDESCR_%u='%s'\n", count, STR(peer_portdescr));
printf("DUPLEX_%u='%s'\n", count, STR(peer_duplex));
printf("PROTOCOL_%u='%s'\n", count, protos[msg->proto].name);
printf("ADDR_INET4_%u='%s'\n", count, STR(msg->peer[PEER_ADDR_INET4]));
printf("ADDR_INET6_%u='%s'\n", count, STR(msg->peer[PEER_ADDR_INET6]));
printf("ADDR_802_%u='%s'\n", count, STR(msg->peer[PEER_ADDR_802]));
printf("VLAN_ID_%u='%s'\n", count, STR(msg->peer[PEER_VLAN_ID]));
printf("CAPABILITIES_%u='%s'\n", count, STR(cap));
printf("TTL_%u='%" PRIu16 "'\n", count, msg->ttl);
printf("HOLDTIME_%u='%" PRIu16 "'\n", count, holdtime);
@quakec
Copy link
Author

quakec commented Feb 18, 2017

I have figured it out now. Also new to Linux and wasn't running my version of the service after compiling :)

@quakec quakec closed this as completed Feb 18, 2017
@sspans
Copy link
Owner

sspans commented Apr 20, 2017

Care to share your diff? Perhaps it's useful to add to ladvd.

@sspans sspans reopened this Apr 20, 2017
@quakec
Copy link
Author

quakec commented May 21, 2017

I've forked your dist, only three files changed so I've also contained them in a tarball here...
ladvd-1.1.0.001.tar.gz

@sspans
Copy link
Owner

sspans commented May 21, 2017

Ack, I'll take a look at the diff. Hopefully this can be merged for the next release.

@quakec
Copy link
Author

quakec commented May 22, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants