diff --git a/GIDs b/GIDs index 636398a..56da960 100644 --- a/GIDs +++ b/GIDs @@ -267,6 +267,7 @@ bbs:*:944: dbxml:*:945: gnokii:*:947: dnrd:*:948: +_lldpd:*:949: conquest:*:950: openerpd:*:951: bitten-slave:*:952: diff --git a/UIDs b/UIDs index 8f8bfae..e62e78d 100644 --- a/UIDs +++ b/UIDs @@ -271,6 +271,7 @@ bbs:*:944:944::0:0:& user:/nonexistent:/usr/sbin/nologin dbxml:*:945:945::0:0:& user:/nonexistent:/usr/sbin/nologin mapred:*:947:955::0:0:Hadoop MapReduce user:/nonexistent:/usr/sbin/nologin dnrd:*:948:948::0:0:& user:/nonexistent:/usr/sbin/nologin +_lldpd:*:949:949::0:0:lldpd user:/nonexistent:/usr/sbin/nologin openerpd:*:951:951::0:0:Openerpd user:/nonexistent:/usr/sbin/nologin bitten-slave:*:952:952:daemon:0:0:Bitten slave user:/var/lib/bitten-slave:/usr/sbin/nologin _neubot:*:953:953::0:0:neubot daemon:/nonexistent:/usr/sbin/nologin diff --git a/net-mgmt/lldpd/Makefile b/net-mgmt/lldpd/Makefile new file mode 100644 index 0000000..5adf383 --- /dev/null +++ b/net-mgmt/lldpd/Makefile @@ -0,0 +1,64 @@ +# Created by: Mathieu Simon +# $FreeBSD$ + +PORTNAME= lldpd +PORTVERSION= 0.7.13 +CATEGORIES= net-mgmt +MASTER_SITES= http://media.luffy.cx/files/${PORTNAME}/ + +MAINTAINER= freebsd@simweb.ch +COMMENT= LLDP (802.1ab)/CDP/EDP/SONMP/FDP daemon and SNMP subagent + +LICENSE= ISCL + +LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 + +OPTIONS_SUB= yes + +USE_RC_SUBR= lldpd + +USES= libtool +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-privsep \ + --with-privsep-chroot=/var/empty \ + --with-lldpd-ctl-socket=/var/run/lldpd.socket \ + --with-lldpd-pid-file=/var/run/lldpd.pid \ + --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig +INSTALL_TARGET= install-strip + +USERS= _lldpd +GROUPS= _lldpd + +OPTIONS_DEFINE= BASH DOCS DTRACE JSON PROPRIETARY READLINE SNMP XML ZSH +OPTIONS_DEFAULT= BASH JSON PROPRIETARY SNMP XML + +DTRACE_DESC= DTrace support +JSON_DESC= JSON output support +PROPRIETARY_DESC= Support proprietary protocols (CDP/EDP/FDP/SONMP) +SNMP_DESC= Enable the use of SNMP +XML_DESC= XML output support + +DTRACE_CONFIGURE_ENABLE= dtrace +JSON_CONFIGURE_WITH= json +READLINE_CONFIGURE_WITH= readline +SNMP_CONFIGURE_WITH= snmp +XML_CONFIGURE_WITH= xml + +JSON_LIB_DEPENDS= libjansson.so:${PORTSDIR}/devel/jansson +JSON_USES= pkgconfig +SNMP_LIB_DEPENDS= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp +XML_LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2 + +post-stage: + @${CP} ${FILESDIR}/README.bsd ${STAGEDIR}${DOCSDIR} + +.include + +.if ${PORT_OPTIONS:MPROPRIETARY} +CONFIGURE_ARGS+=--enable-cdp --enable-edp --enable-fdp --enable-sonmp +.else +CONFIGURE_ARGS+=--disable-cdp --disable-edp --disable-fdp --disable-sonmp +.endif + +.include diff --git a/net-mgmt/lldpd/distinfo b/net-mgmt/lldpd/distinfo new file mode 100644 index 0000000..4f3d604 --- /dev/null +++ b/net-mgmt/lldpd/distinfo @@ -0,0 +1,2 @@ +SHA256 (lldpd-0.7.13.tar.gz) = bbba3ef922f6b6cc6d2c0f008066dc882750557661c54dd1b97ae7936678d92d +SIZE (lldpd-0.7.13.tar.gz) = 1523864 diff --git a/net-mgmt/lldpd/files/README.bsd b/net-mgmt/lldpd/files/README.bsd new file mode 100644 index 0000000..dadccc2 --- /dev/null +++ b/net-mgmt/lldpd/files/README.bsd @@ -0,0 +1,3 @@ +An normal user has to be member of the _lldpd group in order to run lldpcli. + +-- Mathieu Simon , Tue, 10 Dec 2014 13:40:00 +01:00 diff --git a/net-mgmt/lldpd/files/lldpd.in b/net-mgmt/lldpd/files/lldpd.in new file mode 100755 index 0000000..a632bee --- /dev/null +++ b/net-mgmt/lldpd/files/lldpd.in @@ -0,0 +1,32 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: lldpd +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# lldpd_enable (bool): Set to NO by default. +# Set it to YES to enable lldpd. +# lldpd_flags (str): Flags passed to lldpd on startup. +# Default is "". + +. /etc/rc.subr + +name=lldpd +rcvar=lldpd_enable + +load_rc_config $name + +: ${lldpd_enable:="NO"} +: ${lldpd_flags=""} + +command=%%PREFIX%%/sbin/${name} +pidfile=/var/run/${name}.pid + +command_args=${lldpd_flags} + +run_rc_command "$1" diff --git a/net-mgmt/lldpd/pkg-descr b/net-mgmt/lldpd/pkg-descr new file mode 100644 index 0000000..800f026 --- /dev/null +++ b/net-mgmt/lldpd/pkg-descr @@ -0,0 +1,18 @@ +LLDP (Link Layer Discovery Protocol) is an industry standard protocol +designed to supplant proprietary Link-Layer protocols such as +Extreme's EDP (Extreme Discovery Protocol) and CDP (Cisco Discovery +Protocol). The goal of LLDP is to provide an inter-vendor compatible +mechanism to deliver Link-Layer notifications to adjacent network +devices. + +lldpd implements both reception and sending. It also implements an +SNMP subagent for net-snmp to get local and remote LLDP +information. The LLDP MIB is partially implemented but the most useful +tables are here. lldpd also partially implements LLDP-MED. + +lldpd supports bridge, vlan and bonding. bonding need to be done on +real physical devices, not on bridges, vlans, etc. However, vlans can +be mapped on the bonding device. You can bridge vlan but not add vlans +on bridges. More complex setups may give false results. + +WWW: http://vincentbernat.github.io/lldpd/ diff --git a/net-mgmt/lldpd/pkg-message b/net-mgmt/lldpd/pkg-message new file mode 100644 index 0000000..f775efa --- /dev/null +++ b/net-mgmt/lldpd/pkg-message @@ -0,0 +1,2 @@ +To run lldpd from startup, add lldpd_enable="YES" to your rc.conf. +Add lldpd_flags to your rc.conf to set options. diff --git a/net-mgmt/lldpd/pkg-plist b/net-mgmt/lldpd/pkg-plist new file mode 100644 index 0000000..08e67e3 --- /dev/null +++ b/net-mgmt/lldpd/pkg-plist @@ -0,0 +1,21 @@ +%%BASH%%etc/bash_completion.d/lldpcli.bash-completion +%%ETCDIR%%.d/README.conf +include/lldp-const.h +include/lldpctl.h +lib/liblldpctl.a +lib/liblldpctl.so +lib/liblldpctl.so.4 +lib/liblldpctl.so.4.4.0 +libdata/pkgconfig/lldpctl.pc +man/man8/lldpcli.8.gz +man/man8/lldpctl.8.gz +man/man8/lldpd.8.gz +sbin/lldpcli +sbin/lldpctl +sbin/lldpd +%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTE.md +%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/README.bsd +%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/README.md +%%ZSH%%share/zsh/vendor-completions/_lldpcli