Skip to content

Commit

Permalink
lldpad: initial git commit
Browse files Browse the repository at this point in the history
Initial git commit for open-lldp.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
  • Loading branch information
John Fastabend committed Jan 10, 2011
0 parents commit a37b7e0
Show file tree
Hide file tree
Showing 106 changed files with 34,671 additions and 0 deletions.
339 changes: 339 additions & 0 deletions COPYING

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Changes from 0.9.39 through 0.940
- Add iSCSI TLV support
Changes from 0.9.26 through 0.9.39
- Numerous bug fixes and code cleanup
- Reworked netlink event handling to be more robust and handle dropped nlmsgs.
- DCBx puts netdevice into linkmode until dcbx negotiation complete
Changes from 0.9.21 through 0.9.26
- Fork dcbd into lldpad and make the daemon a generic LLDP agent deamon.
Changes from 0.9.19 through 0.9.21
- Update libconfig to version 1.3.2. Fix code to match API changes.
- Add dcbd -k -s options in README and manpage.
- Fix dcbd seg fault when dcbd.conf version string is not 1.0.
- Move the dcbd.conf out of the /etc/sysconfig/ directory into /var/lib/dcbd.
Changes from 0.9.15 through 0.9.19
- Send App priority information to driver via netlink (if kernel supports)
- dcbtool returns non-zero status on error
- Allow user priority percentages (uppct) to be changed while using DCBX v2.
- Improved dcbtool parameter parsing to detect invalid arguments.
- Fixed segfault which occurred in some cases of the config file was removed.
- Fixed dcbtool get app oper error.
Changes from 0.9.7 through 0.9.15
- Set FeatureSeqNo to 1 in the case of peer expiration.
- Use the MSG_DONTWAIT flag in the recv socket call to avoid potential of making
a blocking call - which would hang dcbd.
- Move initialization of control interface before call to init ports to
avoid use of uninitialized variable.
- Add support of SAN MAC address, get SAN MAC address through driver interface.
- Add -s, -k command line options.
- Dcbd, dcbtool man pages and README are updated.
- Set the SO_PRIORITY of the LLDP socket to TC_PRIO_CONTROL (7). This will
help the driver to know not to priority tag the LLDP packets.
- Add shared memory segment to save some DCBX state information when
dcbd stops. Used to restore DCBX state on restart of dcbd.
- Change default dcbx version to 2.
- Only send the version 2 DCBX TLV when in dcbx version 2 mode (instead of
both version TLVs).
- Fix dcbd init script so that it loads the dcbnl module for kernels which
have the option of a dcbnl module.
- A dcbtool error message was changed from "Device not found" to
"Device not found, link down or DCB not enabled"
- Each DCB feature (PFC, PG, ...) was modified in driver to indicate whether
or not a hw reset is required when the feature configuration changes.
If a HW reset will occur, then dcbd will not react to the next link bounce.
- Ensure that HW flow control settings are synced with the DCBX operational
state.
- Runlevel 4 removed from the dcbd init script.
- Fix error flag for willing==willing case.
- Don't print out error message anymore in remove_adapter for the default
config object for objects which aren't created for the default config.
- Fixed potential memory leak in rare shutdown scenarios
- Deleted line of unreachable dead code.
- Remove BCN support from dcbd and dcbtool
- Limit values for DcbxSubtype - Write Operational DcbxSubtype for query
- For dcbx version 2, rebalance bandwidth % assignements on set of Priority
Group feature
93 changes: 93 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# target programs to be installed in ${sbindir}
sbin_PROGRAMS = lldpad dcbtool lldptool

# package nltest, but do not install it anywhere
noinst_PROGRAMS = nltest

# look for header files in the include directory
# pass the value of ${sysconfdir} to the C pre-processor as SYSCONFDIR
AM_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR="\"${sysconfdir}\""

## system requires a shared libconfig
AM_CFLAGS = $(LIBCONFIG_CFLAGS)
AM_LDFLAGS = $(LIBCONFIG_LIBS)

## header files to be installed, for programs using the client interface to lldpad
lldpad_includedir= ${includedir}/lldpad

lldpad_include_HEADERS = include/dcb_types.h \
include/clif.h include/lldp_dcbx_cmds.h \
include/lldpad.h include/lldp_mand_cmds.h \
include/clif_msgs.h include/lldp_basman_cmds.h include/lldp_8023_cmds.h \
include/lldp_med_cmds.h include/lldp_util.h

noinst_HEADERS = include/config.h include/ctrl_iface.h \
include/dcb_driver_interface.h \
include/dcb_events.h include/dcb_persist_store.h include/dcb_protocol.h \
include/dcb_rule_chk.h include/lldp_dcbx_nl.h include/eloop.h \
include/lldpad_shm.h include/event_iface.h include/messages.h \
include/parse_cli.h include/version.h include/lldptool_cli.h include/list.h \
include/lldp_mand_clif.h include/lldp_basman_clif.h include/lldp_med_clif.h \
include/lldp_8023_clif.h include/lldp_dcbx_clif.h include/lldptool.h \
include/lldp_rtnl.h include/dcbtool.h include/lldp_dcbx_cfg.h

lldpad_SOURCES = lldpad.c config.c lldp_dcbx_nl.c ctrl_iface.c \
event_iface.c eloop.c lldp_dcbx_cmds.c log.c lldpad_shm.c \
dcb_protocol.c dcb_rule_chk.c list.c lldp_rtnl.c \
$(lldpad_include_HEADERS) $(noinst_HEADERS) \
lldp/ports.c lldp/agent.c lldp/l2_packet_linux.c lldp/tx.c \
lldp/rx.c lldp/agent.h lldp/l2_packet.h lldp/mibdata.h lldp/ports.h \
lldp/states.h include/lldp.h include/lldp_mod.h \
lldp_dcbx.c include/lldp_dcbx.h tlv_dcbx.c include/tlv_dcbx.h \
lldp_dcbx_cfg.c include/lldp_dcbx_cfg.h lldp_util.c \
lldp_mand.c include/lldp_mand.h \
lldp_mand_cmds.c lldp_basman_cmds.c lldp_8023_cmds.c lldp_med_cmds.c \
lldp_tlv.c include/lldp_tlv.h \
lldp_basman.c include/lldp_basman.h \
lldp_med.c include/lldp_med.h \
lldp_8023.c include/lldp_8023.h

dcbtool_SOURCES = dcbtool.c clif.c dcbtool_cmds.c parse_cli.l \
$(lldpad_include_HEADERS) $(noinst_HEADERS)

lldptool_SOURCES = lldptool.c clif.c lldptool_cmds.c lldp_rtnl.c \
lldp_mand_clif.c lldp_basman_clif.c lldp_med_clif.c \
lldp_8023_clif.c lldp_dcbx_clif.c lldp_util.c \
$(lldpad_include_HEADERS) $(noinst_HEADERS)

nltest_SOURCES = nltest.c nltest.h

## man pages
dist_man_MANS = lldpad.8 dcbtool.8 lldptool.8

## force the creation of an empty configuration directory at install time
lldpadconfigdir = /var/lib/lldpad
lldpadconfig_DATA =

## pkg-config data file, for client interface software to find headers
pkgconfigdir = ${libdir}/pkgconfig
pkgconfig_DATA = lldpad.pc

## put a spec file and documentation in the distribution archive
dist_noinst_DATA = lldpad.spec README COPYING ChangeLog

## lldpad.init is listed here because it gets installed from install-data-local
dist_noinst_SCRIPTS = lldpad.init

## special hooks to handle the init script
install-data-local: lldpad.init
$(MKDIR_P) $(DESTDIR)/etc/init.d
$(INSTALL_SCRIPT) lldpad.init $(DESTDIR)/etc/init.d/lldpad

install-data-hook:
/sbin/chkconfig --add lldpad || true
## provide legacy support for apps that use the old dcbd interface.
test -e $(includedir)/dcbd || `ln -T -s $(includedir)/lldpad $(includedir)/dcbd`
test -e $(includedir)/dcbd/clif_cmds.h || `ln -T -s $(includedir)/lldpad/lldp_dcbx_cmds.h $(includedir)/dcbd/clif_cmds.h`

uninstall-local:
/sbin/chkconfig --del lldpad || true
rm -f '$(DESTDIR)/etc/init.d/lldpad'
rm -f '$(includedir)/dcbd/clif_cmds.h'
rm -f '$(includedir)/dcbd'

Loading

0 comments on commit a37b7e0

Please sign in to comment.