},
"nixpkgs": {
"locked": {
- "lastModified": 1659606041,
- "narHash": "sha256-W4/u2ssr3fS4XOtltrsDD9w2kF4jYYZr6JyPGUW2jdI=",
+ "lastModified": 1697009197,
+ "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5f9b871b72b24f066b1a1e189efd0669f2888c49",
+ "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
"type": "github"
},
"original": {
"--with-systemdsystemunitdir=\${out}/lib/systemd/system"
];
- nativeBuildInputs = with pkgs; [ pkgconfig autoreconfHook git check ];
+ nativeBuildInputs = with pkgs; [ pkg-config autoreconfHook git check ];
buildInputs = with pkgs; [ libevent readline net-snmp openssl ];
outputs = [ "out" "dev" "man" "doc" ];
};
/* LLDP-MED inventory */
# define LLDP_INVENTORY(value, subtype) \
- if (value) { \
- if (!(POKE_START_LLDP_TLV(LLDP_TLV_ORG) && \
- POKE_BYTES(med, sizeof(med)) && POKE_UINT8(subtype) && \
- POKE_BYTES(value, \
- (strlen(value) > 32) ? 32 : strlen(value)) && \
- POKE_END_LLDP_TLV)) \
- goto toobig; \
- }
+ if (value) { \
+ if (!(POKE_START_LLDP_TLV(LLDP_TLV_ORG) && POKE_BYTES(med, sizeof(med)) && \
+ POKE_UINT8(subtype) && \
+ POKE_BYTES(value, (strlen(value) > 32) ? 32 : strlen(value)) && \
+ POKE_END_LLDP_TLV)) \
+ goto toobig; \
+ }
if (port->p_med_cap_enabled & LLDP_MED_CAP_IV) {
LLDP_INVENTORY(chassis->c_med_hw, LLDP_TLV_MED_IV_HW);
return 0;
}
-#define CHECK_TLV_SIZE(x, name) \
- do { \
- if (tlv_size < (x)) { \
- log_warnx("lldp", name " TLV too short received on %s", \
- hardware->h_ifname); \
- goto malformed; \
- } \
- } while (0)
-#define CHECK_TLV_MAX_SIZE(x, name) \
- do { \
- if (tlv_size > (x)) { \
- log_warnx("lldp", name " TLV too large received on %s", \
- hardware->h_ifname); \
- goto malformed; \
- } \
- } while (0)
+#define CHECK_TLV_SIZE(x, name) \
+ do { \
+ if (tlv_size < (x)) { \
+ log_warnx("lldp", name " TLV too short received on %s", hardware->h_ifname); \
+ goto malformed; \
+ } \
+ } while (0)
+#define CHECK_TLV_MAX_SIZE(x, name) \
+ do { \
+ if (tlv_size > (x)) { \
+ log_warnx("lldp", name " TLV too large received on %s", hardware->h_ifname); \
+ goto malformed; \
+ } \
+ } while (0)
int
lldp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardware,