Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
IpAddr.h
00001 #pragma once 00002 //////////////////////////////////////////////////////////////////////////////// 00003 // TcpSocket.h 00004 //////////////////////////////////////////////////////////////////////////////// 00005 00006 #include "NyLPC_net.h" 00007 00008 namespace MiMic 00009 { 00010 /** 00011 * This class hold IP address. 00012 */ 00013 class IpAddr 00014 { 00015 public: 00016 union TAddrs{ 00017 struct NyLPC_TIPv4Addr v4; 00018 }addr; 00019 public: 00020 IpAddr() 00021 {this->setIPv4(0,0,0,0);} 00022 IpAddr(unsigned char p4,unsigned char p3,unsigned char p2,unsigned char p1) 00023 {this->setIPv4(p4,p3,p2,p1);} 00024 00025 void setIPv4(unsigned char p4,unsigned char p3,unsigned char p2,unsigned char p1) 00026 {NyLPC_TIPv4Addr_set(&this->addr.v4,p4,p3,p2,p1);} 00027 void setIPv4(const struct NyLPC_TIPv4Addr& v4) 00028 {this->addr.v4=v4;} 00029 }; 00030 }
Generated on Tue Jul 12 2022 16:22:56 by
