diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-08-21 14:19:59 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-08-21 11:59:54 +0200 |
commit | 905ecd2b0b8a6ab68b66017ec47e094253233e74 (patch) | |
tree | 17b470748c32e17d690620315f293efded491fe4 /passt.h | |
parent | 066e69986b96bf83dfa2ec09f6b03b6a7ad6bbd6 (diff) | |
download | passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar.gz passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar.bz2 passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar.lz passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar.xz passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.tar.zst passt-905ecd2b0b8a6ab68b66017ec47e094253233e74.zip |
treewide: Rename MAC address fields for clarity
c->mac isn't a great name, because it doesn't say whose mac address it is
and it's not necessarily obvious in all the contexts we use it. Since this
is specifically the address that we (passt/pasta) use on the tap interface,
rename it to "our_tap_mac". Rename the "mac_guest" field to "guest_mac"
to be grammatically consistent.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.h')
-rw-r--r-- | passt.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -172,8 +172,8 @@ struct ip6_ctx { * @epollfd: File descriptor for epoll instance * @fd_tap_listen: File descriptor for listening AF_UNIX socket, if any * @fd_tap: AF_UNIX socket, tuntap device, or pre-opened socket - * @mac: Host MAC address - * @mac_guest: MAC address of guest or namespace, seen or configured + * @our_tap_mac: Pasta/passt's MAC on the tap link + * @guest_mac: MAC address of guest or namespace, seen or configured * @hash_secret: 128-bit secret for siphash functions * @ifi4: Index of template interface for IPv4, 0 if IPv4 disabled * @ip: IPv4 configuration @@ -226,8 +226,8 @@ struct ctx { int epollfd; int fd_tap_listen; int fd_tap; - unsigned char mac[ETH_ALEN]; - unsigned char mac_guest[ETH_ALEN]; + unsigned char our_tap_mac[ETH_ALEN]; + unsigned char guest_mac[ETH_ALEN]; uint64_t hash_secret[2]; unsigned int ifi4; |