Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
Move some public functions from lldp-internal.c to lldp-tlv.c, as now
they are not internal functions anymore.
|
|
Export struct tlv_packet as a public opaque sd_lldp_packet type and
make its accessor functions public.
|
|
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.
|
|
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.
|
|
A follow-up to 3733eec3e292e4ddb4cba5eb8d3bd8cbee7102d8
|
|
We were using a space more often than not, and this way is
codified in CODING_STYLE.
|
|
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
|
|
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>
|
|
Another uninitialized variable marked as _cleanup_. Set it to NULL to
avoid accessing uninitialized memory.
|
|
Make sure to set _cleanup_ variables to NULL. Otherwise, we free
uninitialized objects.
|
|
|
|
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.
|