From 0ac37dfc6e83cfc4f6fd77ba08e6960bfd2764f2 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 25 Aug 2016 17:48:06 +0200 Subject: [PATCH] net: address operator != and some UDP accessors --- repos/os/include/net/netaddress.h | 3 +++ repos/os/include/net/udp.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/repos/os/include/net/netaddress.h b/repos/os/include/net/netaddress.h index 5f0bfd1260..9ec7375601 100644 --- a/repos/os/include/net/netaddress.h +++ b/repos/os/include/net/netaddress.h @@ -77,6 +77,9 @@ struct Net::Network_address } return true; } + + bool operator!=(const Network_address &other) const { + return !(*this == other); } }; #endif /* _NET__NETADDRESS_H_ */ diff --git a/repos/os/include/net/udp.h b/repos/os/include/net/udp.h index 239a4128ec..35eca9596a 100644 --- a/repos/os/include/net/udp.h +++ b/repos/os/include/net/udp.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 T * data() { return (T *)(_data); } template T const * data() const { return (T const *)(_data); }