net: address operator != and some UDP accessors

This commit is contained in:
Martin Stein 2016-08-25 17:48:06 +02:00 committed by Christian Helmuth
parent 53524be285
commit 0ac37dfc6e
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -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); }