net/eth: Have eth_pad_short_frame() take void* arguments
PATCH 1/1 net/eth: Have eth_pad_short_frame() take void* arguments
Any kind of buffer can hold an Ethernet frame, no just arrays of unsigned chars.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- include/net/eth.h | 2 +- net/eth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/net/eth.h +1 -1
@@ -434,7 +434,7 @@ eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,* @pkt_size: size of the original Ethernet frame * @return true if the frame is padded, otherwise false */ -bool eth_pad_short_frame (uint8_t *padded_pkt,size_t *padded_buflen, +bool eth_pad_short_frame (void *padded_pkt,size_t *padded_buflen,const void *pkt,size_t pkt_size);#endif
net/eth.c +1 -1
@@ -520,7 +520,7 @@ bool eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,return true; } -bool eth_pad_short_frame (uint8_t *padded_pkt,size_t *padded_buflen, +bool eth_pad_short_frame (void *padded_pkt,size_t *padded_buflen,const void *pkt,size_t pkt_size) {assert (padded_buflen && *padded_buflen >=ETH_ZLEN );
Signature · 1 line
2.41.0
Quoted 4 lines · Philippe Mathieu-Daudé
Any kind of buffer can hold an Ethernet frame, no just arrays of unsigned chars.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Reviewed-by Akihiko Odaki <[email protected]>