chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus-proxy: a few simplifications
[elogind.git]
/
src
/
libsystemd-network
/
sd-lldp.c
diff --git
a/src/libsystemd-network/sd-lldp.c
b/src/libsystemd-network/sd-lldp.c
index fa4531005937c7ecf102905b5c4f683de7b368f2..19ef2ccdbda76466d665e340d1645e1cb6f129e3 100644
(file)
--- a/
src/libsystemd-network/sd-lldp.c
+++ b/
src/libsystemd-network/sd-lldp.c
@@
-48,7
+48,7
@@
typedef enum LLDPAgentRXState {
} LLDPAgentRXState;
/* Section 10.5.2.2 Reception counters */
} LLDPAgentRXState;
/* Section 10.5.2.2 Reception counters */
-struct lldp_agent_statitics {
+struct lldp_agent_stati
s
tics {
uint64_t stats_ageouts_total;
uint64_t stats_frames_discarded_total;
uint64_t stats_frames_in_errors_total;
uint64_t stats_ageouts_total;
uint64_t stats_frames_discarded_total;
uint64_t stats_frames_in_errors_total;
@@
-68,7
+68,7
@@
struct sd_lldp {
void *userdata;
LLDPAgentRXState rx_state;
void *userdata;
LLDPAgentRXState rx_state;
- lldp_agent_stati
tics stati
tics;
+ lldp_agent_stati
stics statis
tics;
};
static unsigned long chassis_id_hash_func(const void *p,
};
static unsigned long chassis_id_hash_func(const void *p,
@@
-134,7
+134,7
@@
static int lldp_receive_frame(sd_lldp *lldp, tlv_packet *tlv) {
hashmap_size(lldp->neighbour_mib),
prioq_size(lldp->by_expiry));
hashmap_size(lldp->neighbour_mib),
prioq_size(lldp->by_expiry));
- lldp->statitics.stats_frames_in_total ++;
+ lldp->stati
s
tics.stats_frames_in_total ++;
return 0;
return 0;
@@
-339,8
+339,8
@@
int lldp_handle_packet(tlv_packet *tlv, uint16_t length) {
lldp_set_state(lldp, LLDP_AGENT_RX_WAIT_FOR_FRAME);
if (malformed) {
lldp_set_state(lldp, LLDP_AGENT_RX_WAIT_FOR_FRAME);
if (malformed) {
- lldp->statitics.stats_frames_discarded_total ++;
- lldp->statitics.stats_frames_in_errors_total ++;
+ lldp->stati
s
tics.stats_frames_discarded_total ++;
+ lldp->stati
s
tics.stats_frames_in_errors_total ++;
}
tlv_packet_free(tlv);
}
tlv_packet_free(tlv);
@@
-404,7
+404,7
@@
static void lldp_mib_delete_objects(sd_lldp *lldp) {
lldp_neighbour_port_remove_and_free(p);
lldp_neighbour_port_remove_and_free(p);
- lldp->statitics.stats_ageouts_total ++;
+ lldp->stati
s
tics.stats_ageouts_total ++;
}
}
}
}
@@
-495,7
+495,7
@@
int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
if (time - p->until <= 0)
continue;
if (time - p->until <= 0)
continue;
- sprintf(buf, "'_TTL=
%lu
' ", p->until);
+ sprintf(buf, "'_TTL=
"USEC_FMT"
' ", p->until);
k = strappend(s, buf);
if (!k)
k = strappend(s, buf);
if (!k)