mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
net: address operator != and some UDP accessors
This commit is contained in:
committed by
Christian Helmuth
parent
53524be285
commit
0ac37dfc6e
@@ -77,6 +77,9 @@ struct Net::Network_address
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(const Network_address &other) const {
|
||||
return !(*this == other); }
|
||||
};
|
||||
|
||||
#endif /* _NET__NETADDRESS_H_ */
|
||||
|
||||
@@ -80,6 +80,9 @@ class Net::Udp_packet
|
||||
Genode::uint16_t length() { return host_to_big_endian(_length); }
|
||||
Genode::uint16_t checksum() { return host_to_big_endian(_checksum); }
|
||||
|
||||
void src_port(Genode::uint16_t p) { _src_port = host_to_big_endian(p); }
|
||||
void dst_port(Genode::uint16_t p) { _dst_port = host_to_big_endian(p); }
|
||||
|
||||
template <typename T> T * data() { return (T *)(_data); }
|
||||
template <typename T> T const * data() const { return (T const *)(_data); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user