From a513e2032f2da30392becc11a246e994528fa2e3 Mon Sep 17 00:00:00 2001 From: mrm Date: Wed, 20 Aug 1997 04:18:57 +0000 Subject: Two changes to class IpAddress Added to_octet() Renamed is_arpa() to is_private() --- ASNMP/asnmp/address.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ASNMP/asnmp') diff --git a/ASNMP/asnmp/address.h b/ASNMP/asnmp/address.h index f2190e7c5c7..dd1a1818f5f 100644 --- a/ASNMP/asnmp/address.h +++ b/ASNMP/asnmp/address.h @@ -38,6 +38,7 @@ // ACE OS Adaption layer #include "ace/OS.h" #include "asnmp/smival.h" +#include "asnmp/octet.h" //----[ enumerated types ] -------------------------------- enum address_lengths { @@ -160,6 +161,7 @@ public: virtual unsigned int hashFunction() const { return 0;}; // return a hash key + protected: int valid_flag; // state of constructed object (TRUE/FALSE) @@ -239,8 +241,11 @@ public: int is_broadcast() const; // determine if this a broadcast address - int is_arpanet() const; - // determine if this is ip network 10.x.x.x + int is_private() const; + // per RFC 1597, private addresses are:: 10, 172.16, and 192.168.0 + + void to_octet(OctetStr& octet) const; + // convert address into octet string format in network byte order protected: char output_buffer[MAX_DISPLAY_SZ]; // output buffer @@ -407,7 +412,7 @@ protected: class ACE_Export NetbiosAddress : public Address // = TITLE // Defines the member functions for the concrete class NetbiosAddress. - // The IBM/Microsoft address for NETBIOS, NETBEUI protocol tranport. + // The IBM/Microsoft address for NETBIOS, NETBEUI protocol transport. { public: -- cgit v1.2.1