[uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
This commit is contained in:
41
u-boot-2021.10/include/net/udp.h
Normal file
41
u-boot-2021.10/include/net/udp.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2020 Philippe Reynes <philippe.reynes@softathome.com>
|
||||
*/
|
||||
|
||||
#ifndef __UDP
|
||||
#define __UDP
|
||||
|
||||
/**
|
||||
* struct udp_ops - function to handle udp packet
|
||||
*
|
||||
* This structure provides the function to handle udp packet in
|
||||
* the network loop.
|
||||
*
|
||||
* @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)
|
||||
*/
|
||||
struct udp_ops {
|
||||
int (*prereq)(void *data);
|
||||
int (*start)(void *data);
|
||||
void *data;
|
||||
};
|
||||
|
||||
int udp_prereq(void);
|
||||
|
||||
int udp_start(void);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* to handle udp packet.
|
||||
*
|
||||
* @ops: udp callback
|
||||
* @return: 0 if success, otherwise < 0 on error
|
||||
*/
|
||||
int udp_loop(struct udp_ops *ops);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user