Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

AddrVal Class Reference

#include <Val.h>

Inheritance diagram for AddrVal:

Inheritance graph
[legend]
Collaboration diagram for AddrVal:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AddrVal (const char *text)
 ~AddrVal ()
 AddrVal (uint32 addr)
 AddrVal (const uint32 *addr)
unsigned int MemoryAllocation () const

Protected Member Functions

 AddrVal ()
 AddrVal (TypeTag t)
 AddrVal (BroType *t)
void Init (uint32 addr)
void Init (const uint32 *addr)
 DECLARE_SERIAL (AddrVal)

Friends

class Val

Constructor & Destructor Documentation

AddrVal::AddrVal const char *  text  ) 
 

Definition at line 815 of file Val.cc.

References dotted_to_addr(), dotted_to_addr6(), error(), Init(), TYPE_ADDR, and uint32.

00815                                  : Val(TYPE_ADDR)
00816         {
00817         const char* colon = strchr(text, ':');
00818 
00819         if ( colon )
00820                 {
00821 #ifdef BROv6
00822                 Init(dotted_to_addr6(text));
00823 #else
00824                 error("bro wasn't compiled with IPv6 support");
00825                 Init(uint32(0));
00826 #endif
00827                 }
00828 
00829         else
00830                 Init(dotted_to_addr(text));
00831         }

AddrVal::~AddrVal  ) 
 

Definition at line 844 of file Val.cc.

References BroValUnion::addr_val.

00845         {
00846 #ifdef BROv6
00847         delete val.addr_val;
00848 #endif
00849         }

AddrVal::AddrVal uint32  addr  ) 
 

Definition at line 833 of file Val.cc.

References addr, Init(), TYPE_ADDR, and uint32.

00833                             : Val(TYPE_ADDR)
00834         {
00835         // ### perhaps do gethostbyaddr here?
00836         Init(addr);
00837         }

AddrVal::AddrVal const uint32 addr  ) 
 

Definition at line 839 of file Val.cc.

References addr, Init(), TYPE_ADDR, and uint32.

00839                                    : Val(TYPE_ADDR)
00840         {
00841         Init(addr);
00842         }

AddrVal::AddrVal  )  [inline, protected]
 

Definition at line 539 of file Val.h.

00539 {}

AddrVal::AddrVal TypeTag  t  )  [inline, protected]
 

Definition at line 540 of file Val.h.

00540 : Val(t)        { }

AddrVal::AddrVal BroType t  )  [inline, protected]
 

Definition at line 541 of file Val.h.

00541 : Val(t)        { }


Member Function Documentation

AddrVal::DECLARE_SERIAL AddrVal   )  [protected]
 

void AddrVal::Init const uint32 addr  )  [protected]
 

Definition at line 862 of file Val.cc.

References addr, BroValUnion::addr_val, and uint32.

00863         {
00864 #ifdef BROv6
00865         val.addr_val = new uint32[4];
00866         val.addr_val[0] = addr[0];
00867         val.addr_val[1] = addr[1];
00868         val.addr_val[2] = addr[2];
00869         val.addr_val[3] = addr[3];
00870 #else
00871         val.addr_val = addr[0];
00872 #endif
00873         }

void AddrVal::Init uint32  addr  )  [protected]
 

Definition at line 851 of file Val.cc.

References addr, BroValUnion::addr_val, and uint32.

Referenced by AddrVal(), and NetVal::NetVal().

00852         {
00853 #ifdef BROv6
00854         val.addr_val = new uint32[4];
00855         val.addr_val[0] = val.addr_val[1] = val.addr_val[2] = 0;
00856         val.addr_val[3] = addr;
00857 #else
00858         val.addr_val = addr;
00859 #endif
00860         }

unsigned int AddrVal::MemoryAllocation  )  const [virtual]
 

Reimplemented from Val.

Definition at line 875 of file Val.cc.

References pad_size(), padded_sizeof, and uint32.

00876         {
00877 #ifdef BROv6
00878                 return padded_sizeof(*this) + pad_size(4 * sizeof(uint32));
00879 #else
00880                 return padded_sizeof(*this);
00881 #endif
00882         }


Friends And Related Function Documentation

friend class Val [friend]
 

Reimplemented in NetVal.

Definition at line 538 of file Val.h.


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 03:07:32 2005 for bro_docs by doxygen 1.3.5