mirror of
https://passt.top/passt
synced 2025-05-26 02:55:35 +02:00
treewide: Remove misleading and redundant endianness notes
In general, it's much less error-prone to have the endianness of values implied by the type, rather than just noting it in comments. We can't always easily avoid it, because C, but we can do so when possible. struct in_addr and in6_addr are always encoded network endian, so noting it explicitly isn't useful. Remove them. In some cases we also have endianness notes on uint8_t parameters, which doesn't make sense: for a single byte endianness is irrelevant. Remove those too. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
5d37dab012
commit
1095a7b0c9
3 changed files with 16 additions and 16 deletions
6
tap.c
6
tap.c
|
@ -95,7 +95,7 @@ void tap_send_single(const struct ctx *c, const void *data, size_t len)
|
|||
* tap_ip4_daddr() - Normal IPv4 destination address for inbound packets
|
||||
* @c: Execution context
|
||||
*
|
||||
* Return: IPv4 address, network order
|
||||
* Return: IPv4 address
|
||||
*/
|
||||
struct in_addr tap_ip4_daddr(const struct ctx *c)
|
||||
{
|
||||
|
@ -139,8 +139,8 @@ static void *tap_push_l2h(const struct ctx *c, void *buf, uint16_t proto)
|
|||
/**
|
||||
* tap_push_ip4h() - Build IPv4 header for inbound packet, with checksum
|
||||
* @c: Execution context
|
||||
* @src: IPv4 source address, network order
|
||||
* @dst: IPv4 destination address, network order
|
||||
* @src: IPv4 source address
|
||||
* @dst: IPv4 destination address
|
||||
* @len: L4 payload length
|
||||
* @proto: L4 protocol number
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue