embkernel
 All Classes Functions Variables Typedefs Groups Pages
NetIp.hpp
1 //------------------------------------------------------------------------------
2 //This file is part of embKernel.
3 //See license.txt for the full license governing this code.
4 //------------------------------------------------------------------------------
5 
6 #ifndef NET_IP_HPP_
7 #define NET_IP_HPP_
8 
9 #include "NetDefs.hpp"
10 
11 class NetIp {
12  friend class Net;
13  friend class NetIcmp;
14  friend class NetUdp;
15  friend class NetTcp;
16 private:
17  static void processFrame(NetDefs::FRAME& frame, NetDefs::IP_HEADER& header);
18  static void putHeader(NetDefs::FRAME& frame, const NetDefs::MAC_ADDR& macDst, const NetDefs::IP_ADDR& ipDst, int dataLen, uint8_t protocol);
19  static void flush(NetDefs::FRAME& frame, int dataLen, bool discardable);
20  static bool checkDstAddress(NetDefs::IP_ADDR& address);
21  static void swapHeader(NetDefs::IP_HEADER& header);
22 };
23 
24 #endif /* NET_IP_HPP_ */