1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2020 Philippe Reynes <philippe.reynes@softathome.com>
10 * struct udp_ops - function to handle udp packet
12 * This structure provides the function to handle udp packet in
15 * @prereq: callback called to check the requirement
16 * @start: callback called to start the protocol/feature
17 * @data: pointer to store private data (used by prereq and start)
20 int (*prereq)(void *data);
21 int (*start)(void *data);
30 * udp_loop() - network loop for udp protocol
32 * Launch a network loop for udp protocol and use callbacks
33 * provided in parameter @ops to initialize the loop, and then
34 * to handle udp packet.
37 * @return: 0 if success, otherwise < 0 on error
39 int udp_loop(struct udp_ops *ops);