Bug 206841 - [NEW PORT] security/cdpsnarf: Tool to extract information from CDP packets
Summary: [NEW PORT] security/cdpsnarf: Tool to extract information from CDP packets
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords: feature, patch
Depends on:
Blocks:
 
Reported: 2016-02-02 11:02 UTC by Rihaz Jerrin
Modified: 2016-08-04 12:42 UTC (History)
3 users (show)

See Also:
pi: maintainer-feedback+


Attachments
[new port]: security/cdpsnarf port file (2.25 KB, application/x-shar)
2016-02-02 11:02 UTC, Rihaz Jerrin
no flags Details
[new port]: security/cdpsnarf (3.18 KB, application/x-shar)
2016-02-04 15:41 UTC, Rihaz Jerrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rihaz Jerrin 2016-02-02 11:02:58 UTC
Created attachment 166427 [details]
[new port]: security/cdpsnarf port file

CDPSnarf is a network sniffer exclusively written to extract information from CDP packets.It provides all the information a “show cdp neighbors detail” command would return on a Cisco router and even more.

A feature list follows:

 Time intervals between CDP advertisements
 Source MAC address
 CDP Version
 TTL
 Checksum
 Device ID
 Software version
 Platform
 Addresses
 Port ID
 Capabilities
 Duplex
 Save packets in PCAP dump file format
 Read packets from PCAP dump files
 Debugging information (using the “-d” flag)
 Tested with IPv4 and IPv6
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2016-02-02 20:42:39 UTC
fails to build on current:

===>  Building for cdpsnarf-0.1.6
--- all ---
gcc -O3 -Wall -lm -lpcap cdpsnarf.c -o cdpsnarf
sh: gcc: not found
*** [all] Error code 127
Comment 2 Rihaz Jerrin 2016-02-04 15:41:52 UTC
Created attachment 166564 [details]
[new port]: security/cdpsnarf
Comment 3 Rihaz Jerrin 2016-02-04 15:43:44 UTC
Comment on attachment 166564 [details]
[new port]: security/cdpsnarf

Made the changes and tested it on current:
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2016-02-05 18:58:11 UTC
testbuilds done, looks fine. Would you mind if this is changed from section security to section net or net-mgmt ?

Because it looks much more like a network tool, and less like a security-tool ?

Please comment.
Comment 5 Rihaz Jerrin 2016-02-05 20:13:59 UTC
It's fine to be moved to the  net or net-mgmt section.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-02-05 22:02:35 UTC
A commit references this bug:

Author: pi
Date: Fri Feb  5 22:01:37 UTC 2016
New revision: 408272
URL: https://svnweb.freebsd.org/changeset/ports/408272

Log:
  New port: net-mgmt/cdpsnarf

  CDPSnarf is a network sniffer exclusively written to
  extract information from CDP packets. It provides all
  the information a "show cdp neighbors detail" command
  would return on a Cisco router and even more.

  Features:
    Time intervals between CDP advertisements
    Source MAC address
    CDP Version
    TTL
    Checksum
    Device ID
    Software version
    Platform
    Addresses
    Port ID
    Capabilities
    Duplex
    Save packets in PCAP dump file format
    Read packets from PCAP dump files
    Debugging information (using the "-d" flag)
    Tested with IPv4 and IPv6

  WWW: https://github.com/Zapotek/cdpsnarf

  PR:		206841
  Submitted by:	Rihaz Jerrin <rihaz.jerrin@gmail.com>

Changes:
  head/net-mgmt/Makefile
  head/net-mgmt/cdpsnarf/
  head/net-mgmt/cdpsnarf/Makefile
  head/net-mgmt/cdpsnarf/distinfo
  head/net-mgmt/cdpsnarf/files/
  head/net-mgmt/cdpsnarf/files/patch-cdpsnarf.c
  head/net-mgmt/cdpsnarf/pkg-descr
  head/net-mgmt/cdpsnarf/pkg-plist
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2016-02-05 22:03:21 UTC
Committed, thanks!
Comment 8 John Marino freebsd_committer freebsd_triage 2016-08-03 23:25:26 UTC
Hey Kurt, Rihaz:

I have a question about the line:
LIB_DEPENDS=    libpcap.so:net/libpcap

Is there a version of FreeBSD that doesn't have libpcap?
Right now this line doesn't do anything because the base libpcap.so (e.g. in FreeBSD 10.3) satisfies the requirement.

So my question is:
Is the intent that net/libpcap be used unconditionally or just if the platform is missing it?  If the former, that's not happening (the line would need to be changed to ${LOCALBASE}/lib/libpcap.so:net/libpcap or something like that)
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-08-04 06:16:22 UTC
A commit references this bug:

Author: pi
Date: Thu Aug  4 06:16:18 UTC 2016
New revision: 419597
URL: https://svnweb.freebsd.org/changeset/ports/419597

Log:
  net-mgmt/cdpsnarf: remove unneeded LIB_DEPEND pcap

  PR:		206841
  Reported by:	marino

Changes:
  head/net-mgmt/cdpsnarf/Makefile
Comment 10 John Marino freebsd_committer freebsd_triage 2016-08-04 12:42:15 UTC
Thanks Kurt.
FYI, you didn't need to bump the portrevision.  The LIB_DEPENDS isn't registered, so removing it doesn't affect the package.