diff options
author | Tom Rini <trini@konsulko.com> | 2020-10-01 09:46:10 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-01 09:46:10 -0400 |
commit | 26acc6395fee680cea72e51348bd59e206eb0464 (patch) | |
tree | 14a2a97d03c4c0cf7b0c531fbdcf9ebec7cfdd13 /doc | |
parent | 097bbf1ba97b8ece930deca663f05ea444e99e45 (diff) | |
parent | 912ece4c3dd486bcd62f0d0dfee760b9f01caac6 (diff) | |
download | u-boot-26acc6395fee680cea72e51348bd59e206eb0464.zip u-boot-26acc6395fee680cea72e51348bd59e206eb0464.tar.gz u-boot-26acc6395fee680cea72e51348bd59e206eb0464.tar.bz2 |
Merge branch '2020-09-30-assorted-network-improvements' into next
- Generic UDP framework
- TFTP fixes
- dwc_eth_qos, smc911x, smc911x and mscc phy fixes
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.udp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/README.udp b/doc/README.udp new file mode 100644 index 0000000..da07257 --- /dev/null +++ b/doc/README.udp @@ -0,0 +1,35 @@ +Udp framework + +The udp framework is build on top of network framework and is designed +to define new protocol or new command based on udp without modifying +the network framework. + +The udp framework define a function udp_loop that take as argument +a structure udp_ops (defined in include/net/udp.h) : + +struct udp_ops { + int (*prereq)(void *data); + int (*start)(void *data); + void *data; +}; + +The callback prereq define if all the requirements are +valid before running the network/udp loop. + +The callback start define the first step in the network/udp loop, +and it may also be used to configure a timemout and udp handler. + +The pointer data is used to store private data that +could be used by both callback. + +A simple example to use this framework: + +static struct udp_ops udp_ops = { + .prereq = wmp_prereq, + .start = wmp_start, + .data = NULL, +}; + +... + +err = udp_loop(&udp_ops); |