summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/lldp-internal.c
Commit message (Collapse)AuthorAgeFilesLines
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-1/+2
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* lldp: move lldp_receive_packet() to lldp-internal.cBeniamino Galvani2015-10-021-0/+27
| | | | | | | In order to implement tests for the LLDP state machine, we need to mock lldp_network_bind_raw_socket(). Move the other function lldp_receive_packet() to another file so that we can replace the first function with a custom one and keep the second one.
* lldp: move TLV related functions to lldp-tlv.cBeniamino Galvani2015-10-021-201/+0
| | | | | Move some public functions from lldp-internal.c to lldp-tlv.c, as now they are not internal functions anymore.
* lldp: export opaque TLV type and accessor functionsBeniamino Galvani2015-10-021-30/+31
| | | | | Export struct tlv_packet as a public opaque sd_lldp_packet type and make its accessor functions public.
* lldp: change order of arguments of lldp_read_*() functionsBeniamino Galvani2015-10-021-15/+15
| | | | | | These functions are going to be exported, swap the 'data' and 'length' arguments so that their signature is consistent with the rest of the code.
* lldp: add reference counter to struct tlv_packetBeniamino Galvani2015-10-021-3/+3
| | | | | | Add a reference counter to the tlv_packet structure so that it can be shared between multiple users and properly free'd when no longer in use.
* network: get rid of more RefCnt usageLennart Poettering2015-08-271-7/+7
| | | | A follow-up to 3733eec3e292e4ddb4cba5eb8d3bd8cbee7102d8
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-131-7/+7
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-131-2/+2
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* LLDP: Support locally assigned port subtypeSusant Sahani2015-01-151-0/+1
| | | | | | | The Zyxel switch sends port subtype as Locally assigned (7). Add LLDP_PORT_SUBTYPE_LOCALLY_ASSIGNED as supported type reported by Mantas Mikulėnas <grawity@gmail.com>
* lldp: fix uninitialized cleanup var #2David Herrmann2014-12-311-1/+1
| | | | | Another uninitialized variable marked as _cleanup_. Set it to NULL to avoid accessing uninitialized memory.
* lldp: fix uninitialized cleanup varDavid Herrmann2014-12-311-1/+1
| | | | | Make sure to set _cleanup_ variables to NULL. Otherwise, we free uninitialized objects.
* LLDP: Add support for networkctlSusant Sahani2014-12-191-1/+96
|
* networkd: Introduce Link Layer Discovery Protocol (LLDP)Susant Sahani2014-12-191-0/+437
This patch introduces LLDP support to networkd. it implements the receiver side of the protocol. The Link Layer Discovery Protocol (LLDP) is an industry-standard, vendor-neutral method to allow networked devices to advertise capabilities, identity, and other information onto a LAN. The Layer 2 protocol, detailed in IEEE 802.1AB-2005.LLDP allows network devices that operate at the lower layers of a protocol stack (such as Layer 2 bridges and switches) to learn some of the capabilities and characteristics of LAN devices available to higher layer protocols.