Martin Stein d0f5838c61 net: clean up header fields and accessors
Apply the style rule that an accessor is named similar to the the underlying
value. Provide read and write accessors for each mandatory header attribute.
Fix some incorrect structure in the headers like with the flags field
in Ipv4_packet.

Ref #2490
2017-10-19 13:29:43 +02:00

33 lines
696 B
C++

/*
* \brief Utilities regarding layer 3 protocols in general
* \author Martin Stein
* \date 2016-08-19
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _L3_PROTOCOL_H_
#define _L3_PROTOCOL_H_
/* Genode includes */
#include <net/ipv4.h>
#include <base/stdint.h>
namespace Genode { class Cstring; }
namespace Net {
using L3_protocol = Ipv4_packet::Protocol;
Genode::Cstring const &tcp_name();
Genode::Cstring const &udp_name();
Genode::Cstring const &l3_protocol_name(L3_protocol protocol);
}
#endif /* _L3_PROTOCOL_H_ */