aboutgitcodebugslistschat
path: root/udp.h
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2024-06-13 14:36:51 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-06-13 15:45:32 +0200
commite7ac995217cd214a79ecf81e8a07094092173c65 (patch)
tree9747daf6e01572b64f76d2e2ce7ec35a08dabc1d /udp.h
parent9ecf7fedc5bd9cef6e3b90e67e8a21f5074cfea7 (diff)
downloadpasst-e7ac995217cd214a79ecf81e8a07094092173c65.tar
passt-e7ac995217cd214a79ecf81e8a07094092173c65.tar.gz
passt-e7ac995217cd214a79ecf81e8a07094092173c65.tar.bz2
passt-e7ac995217cd214a79ecf81e8a07094092173c65.tar.lz
passt-e7ac995217cd214a79ecf81e8a07094092173c65.tar.xz
passt-e7ac995217cd214a79ecf81e8a07094092173c65.tar.zst
passt-e7ac995217cd214a79ecf81e8a07094092173c65.zip
udp: refactor UDP header update functions
This commit refactors the udp_update_hdr4() and udp_update_hdr6() functions to improve code portability by replacing the udp_meta_t parameter with more specific parameters for the IPv4 and IPv6 headers (iphdr/ipv6hdr) and the source socket address (sockaddr_in/sockaddr_in6). It also moves the tap_hdr_update() function call inside the udp_tap_send() function not to have to pass the TAP header to udp_update_hdr4() and udp_update_hdr6() This refactor reduces complexity by making the functions more modular and ensuring that each function operates on more narrowly scoped data structures. This will facilitate future backend introduction like vhost-user. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'udp.h')
0 files changed, 0 insertions, 0 deletions