Logo Search packages:      
Sourcecode: paris-traceroute version File versions  Download package

void IP4Header::setSourceAddress ( const char *  address  ) 

Set the Source address field (bytes 12-15)

Definition at line 235 of file IP4Header.cc.

References Util::write32().

Referenced by ICMPProbe::ICMPProbe(), and UDPProbe::UDPProbe().

  struct in_addr buff;
  int res = inet_aton(address, &buff);
  if (res == 0)
    throw TrException(str_log(ERROR, "Invalid source address : %s", address));
  Util::write32(header, 12, buff.s_addr);

Generated by  Doxygen 1.6.0   Back to index