/** * Cleanup all resources allocated by packet socket handler */ static void _cleanup(void) { struct oonf_packet_socket *skt; while (!list_is_empty(&_packet_sockets)) { skt = list_first_element(&_packet_sockets, skt, node); oonf_packet_remove(skt, true); } }
void *stack_top(stack_t *q) { return q ? list_first_element(q) : NULL; }