For a question in forum this is a working example, there will be the example that is not working
Fork of eth_v13 by
ipaddr.h
- Committer:
- hggerdd
- Date:
- 2014-03-18
- Revision:
- 0:f7caac9b804e
File content as of revision 0:f7caac9b804e:
#ifndef IPADDR_H #define IPADDR_H #include <stdint.h> class IpAddr { public: IpAddr(); IpAddr(uint8_t ip0, uint8_t ip1, uint8_t ip2, uint8_t ip3); bool isNull(); bool isEqual(IpAddr *addr2); int getIpPart(uint8_t i); bool isSameSubnet(IpAddr * addr2, IpAddr * netmask); bool operator==(IpAddr * rhs); bool operator==(IpAddr &rhs); void getIP(uint8_t *ip); private: uint8_t m_ip[4]; }; #endif