X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/093ef819f410add240cf97b72f9e7dcab5abd16c..384545ce291041b819661bf6d66b00e4c8ee88fd:/practicas/pipi/src/ipaddr.h?ds=inline diff --git a/practicas/pipi/src/ipaddr.h b/practicas/pipi/src/ipaddr.h index 0c0c549..b5c9cea 100644 --- a/practicas/pipi/src/ipaddr.h +++ b/practicas/pipi/src/ipaddr.h @@ -4,13 +4,14 @@ #include #include #include +#include /// Dirección IP struct IPAddr { /// Átomo de dirección IP - typedef unsigned char atom; + typedef uint8_t atom; /// Representación interna atom atoms[4]; @@ -22,16 +23,16 @@ struct IPAddr IPAddr(atom a1, atom a2, atom a3, atom a4); /// Constructor - IPAddr(int ip); + IPAddr(uint32_t ip); /// Constructor - IPAddr(const char* ip) throw (std::logic_error); + //IPAddr(const char* ip) throw (std::logic_error); /// Constructor - //IPAddr(const std::string& ip) throw (std::logic_error); + IPAddr(const std::string& ip) throw (std::logic_error); /// Operador de casteo a unsigned - operator unsigned () const; + operator uint32_t () const; /// Operador de casteo a std::string operator std::string () const;