net: let Net_address and Ipv4_address be packed

Ref #2139
This commit is contained in:
Martin Stein 2016-10-24 11:46:14 +02:00 committed by Christian Helmuth
parent 4281471a34
commit 4eea2a058d
2 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,8 @@ struct Net::Ipv4_address : Network_address<IPV4_ADDR_LEN, '.', false>
Ipv4_address(void *src) : Network_address(src) { }
bool valid() const { return *this != Ipv4_address(); }
};
}
__attribute__((packed));
/**

View File

@ -80,6 +80,7 @@ struct Net::Network_address
bool operator!=(const Network_address &other) const {
return !(*this == other); }
};
}
__attribute__((packed));
#endif /* _NET__NETADDRESS_H_ */