mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
net: address operator != and some UDP accessors
This commit is contained in:
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); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user