tdorssers / cdpr-3.0 Goto Github PK
View Code? Open in Web Editor NEWA fork of CDPR to decode CDP and LLDP packets
License: GNU General Public License v2.0
A fork of CDPR to decode CDP and LLDP packets
License: GNU General Public License v2.0
Hi!
I was looking at testing the Voice vlan function. I'd like to see if this triggers a full CDP update or just the VoiceVlan response.
ldumont@eyes:~/cdpr-3.0$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
ldumont@eyes:~/cdpr-3.0$ sudo dpkg -l | grep libpcap
ii libpcap-dev 1.8.1-3 all development library for libpcap (transitional package)
ii libpcap0.8:amd64 1.8.1-3 amd64 system interface for user-level packet capture
ii libpcap0.8-dev 1.8.1-3 amd64 development library and header files for libpcap0.8
ldumont@eyes:~/cdpr-3.0$ make cdpr
gcc -Wall -W -O2 -std=gnu99 cdpr.c cdps.c cdp.c os_version_info.c -lpcap -o cdpr
/tmp/cczVHrZV.o: In function `main':
cdpr.c:(.text.startup+0x522): undefined reference to `print_lldp_packet'
/tmp/ccfJcxGE.o: In function `print_cdp_packet':
cdp.c:(.text+0xf4c): undefined reference to `print_location_id'
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'cdpr' failed
make: *** [cdpr] Error 1
Hi Tim, I'm sorry this is quite specific, but I can't wrap my head around why this is not working.
I want to use the output of your cdpr tool for some actions in a NetworkManager dispatcher script.
I wrote a test script and put it in /etc/NetworkManager/dispatcher.d/
In this script, your cdpr tool is executed with -d eth0 -t 10 and the output saved to a text file for debugging.
When I directly execute this script with sudo, everything works. When NetworkManager automatically executes the script, it seems like cdpr will finish instantly, without waiting for a CDP response:
CDP Output:
Cisco Discovery Protocol Reporter
Version 3.0.4 by Tim Dorssers
Timeout enabled for 10 seconds
Use -h option to see usage
Using device eth0
Sending on 1 interface(s)
Done
Press any key to quit or wait for timeout
Listening on 1 interface(s)
Done
This happens instantly, not waiting for 10 seconds.
Do you have any idea why this might be the case?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.