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