Home
last modified time | relevance | path

Searched refs:raw_size (Results 1 – 7 of 7) sorted by relevance

/systemd-251/src/libsystemd-network/
Dlldp-neighbor.c116 sd_lldp_neighbor *lldp_neighbor_new(size_t raw_size) { in lldp_neighbor_new() argument
119 if (raw_size > SIZE_MAX - ALIGN(sizeof(sd_lldp_neighbor))) in lldp_neighbor_new()
122 n = malloc0(ALIGN(sizeof(sd_lldp_neighbor)) + raw_size); in lldp_neighbor_new()
126 n->raw_size = raw_size; in lldp_neighbor_new()
176 if (n->raw_size < sizeof(struct ether_header)) in lldp_neighbor_parse()
199 left = n->raw_size - sizeof(struct ether_header); in lldp_neighbor_parse()
358 if (a->raw_size != b->raw_size) in lldp_neighbor_equal()
361 return memcmp(LLDP_NEIGHBOR_RAW(a), LLDP_NEIGHBOR_RAW(b), a->raw_size) == 0; in lldp_neighbor_equal()
386 *size = n->raw_size; in sd_lldp_neighbor_get_raw()
644 int sd_lldp_neighbor_from_raw(sd_lldp_neighbor **ret, const void *raw, size_t raw_size) { in sd_lldp_neighbor_from_raw() argument
[all …]
Dndisc-router.c21 sd_ndisc_router *ndisc_router_new(size_t raw_size) { in ndisc_router_new() argument
24 if (raw_size > SIZE_MAX - ALIGN(sizeof(sd_ndisc_router))) in ndisc_router_new()
27 rt = malloc0(ALIGN(sizeof(sd_ndisc_router)) + raw_size); in ndisc_router_new()
31 rt->raw_size = raw_size; in ndisc_router_new()
67 *size = rt->raw_size; in sd_ndisc_router_get_raw()
80 if (rt->raw_size < sizeof(struct nd_router_advert)) in ndisc_router_parse()
104 left = rt->raw_size - sizeof(struct nd_router_advert); in ndisc_router_parse()
262 assert(rt->raw_size >= sizeof(struct nd_router_advert)); in sd_ndisc_router_option_rewind()
265 return rt->rindex < rt->raw_size; in sd_ndisc_router_option_rewind()
273 if (rt->rindex == rt->raw_size) /* EOF */ in sd_ndisc_router_option_next()
[all …]
Dndisc-router.h19 size_t raw_size; member
47 sd_ndisc_router *ndisc_router_new(size_t raw_size);
Dlldp-neighbor.h39 size_t raw_size; member
89 sd_lldp_neighbor *lldp_neighbor_new(size_t raw_size);
Dsd-lldp-rx.c216 length = recv(fd, LLDP_NEIGHBOR_RAW(n), n->raw_size, MSG_DONTWAIT); in lldp_rx_receive_datagram()
225 if ((size_t) length != n->raw_size) { in lldp_rx_receive_datagram()
Dsd-ndisc.c225 r = icmp6_receive(fd, NDISC_ROUTER_RAW(rt), rt->raw_size, &rt->address, &rt->timestamp); in ndisc_recv()
/systemd-251/src/systemd/
Dsd-lldp-rx.h71 int sd_lldp_neighbor_from_raw(sd_lldp_neighbor **ret, const void *raw, size_t raw_size);