00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef IPV6ADDR_H
00022 #define IPV6ADDR_H
00023
00024 #include <iostream>
00025 #include <fstream>
00026 #include <iomanip>
00027 using namespace std;
00028 class TIPv6Addr
00029 {
00030 friend std::ostream& operator<<(std::ostream& out,TIPv6Addr& group);
00031 public:
00032 TIPv6Addr();
00033 TIPv6Addr(char* addr, bool plain=false);
00034 char* getAddr();
00035 void setAddr(char* addr);
00036 char* getPlain();
00037 char* storeSelf(char *buf);
00038 bool linkLocal();
00039 TIPv6Addr operator-(const TIPv6Addr &other);
00040 TIPv6Addr operator+(const TIPv6Addr &other);
00041 TIPv6Addr& operator--();
00042 bool operator==(const TIPv6Addr &other);
00043 bool operator<=(const TIPv6Addr &other);
00044 private:
00045 char Addr[16];
00046 char Plain[sizeof("0000:0000:0000:0000:0000:0000:0000.000.000.000.000")];
00047 };
00048 #endif
00049