Lines Matching refs:raw_size
21 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()
276 if (rt->rindex + 2 > rt->raw_size) /* Truncated message */ in sd_ndisc_router_option_next()
280 if (rt->rindex + length > rt->raw_size) in sd_ndisc_router_option_next()
284 return rt->rindex < rt->raw_size; in sd_ndisc_router_option_next()
291 if (rt->rindex == rt->raw_size) /* EOF */ in sd_ndisc_router_option_get_type()
294 if (rt->rindex + 2 > rt->raw_size) /* Truncated message */ in sd_ndisc_router_option_get_type()
323 if (rt->rindex + 2 > rt->raw_size) in sd_ndisc_router_option_get_raw()
327 if (rt->rindex + length > rt->raw_size) in sd_ndisc_router_option_get_raw()