[Bro] Why does Bro store addresses internally in network order (AddrVal class)?

José María González chema at cs.berkeley.edu
Thu Sep 16 20:50:21 PDT 2004


Simple question, eh? I assume there has to be a reason 
for this. 

When parsing a D.D.D.D text, scan.l calls AddrVal::AddrVal(char const *), 
which Init()'s its addr_val using dotted_to_addr() (net_util.cc). The 
latter parses the text and calls htonl() before returning. 

-Chema



More information about the Bro mailing list