Page History

Turn Off History

What should be changed?

All the deprecated BSD socket functions. These are complete list.


numbers in right denotes lines of code that has the keyword.

struct sockaddr_in : 237
gethostbyname      : 165
gethostbyname2     : 0
getservbyname      : 5
gethostbyaddr      : 23
getservbyport      : 0
inet_addr          : 13
inet_aton          : 7
inet_nsap_addr     : 0
inet_ntoa          : 114
inet_nsap_ntoa     : 0
inet_makeaddr      : 0
inet_netof         : 0
inet_network       : 0
inet_neta          : 0
inet_net_netop     : 0
inet_net_pton      : 0
rcmd               : 10
rexec              : 2
rrsevport          : 0

total 576 lines of code *must* be changed.

IP address is no longer fixed 4 bytes nor fixed 16 bytes. It can be both of them. So, every storage class should be changed. For some of source codes that use 'int' as storage for IP address, this is most troublesome because it could be hidden to text search.

Current Condor Code Base

sockaddr_in is used in many areas and also unsigned long is used to hold IP address.

There are many places to change. For example, in sock.h,
unsigned int Sock::get_ip_int()
unsigned int Sock::peer_ip_int()
It uses 'unsigned int' to pass IP address.

The method of Attack

Having some network abstraction classes, single IP address class that deals both IPv4 and IPv6. So, nobody uses sockaddr, sockaddr_in, or plain int to represent IP address.

class Sock already has abstraction of BSD socket interface. But, IP address escapes from this classes by returning it as an 4 byte int and sockaddr_in.

Todo

Manageable daily work-list.

  1. investigate every source code where calls obsolete BSD socket interface.
  2. remove every obsolete interface.
  3. investigate ipv6 address handling in C++ Boost library
  4. make unified address class

Note

*** currently, this is just temporary page