Page History

Turn Off History

First milestone

It had been since few months so it may not appropriate to call it as first mile stone. I would say it is first milestone for working code of Condor.

Features

Will not be implemented

Condor netdb (a.k.a NO_DNS)

These will not be included in first milestone however these would be ported in near future.

struct hostent *
condor_gethostbyname(const char *name);

struct hostent *
condor_gethostbyaddr(const char *addr, SOCKET_LENGTH_TYPE len, int type);

int
condor_gethostname(char *name, size_t namelen);

Returning a pointer of a static buffer inside a function

It is quite common practice in Condor source code that returning a pointer of a static buffer in a function. It was perfectly fine in a world that pthread is rare and multi-core is unknown. It is obviously non-re-entrant and non-thread-safe. Well, I could do as it was. But, I am slightly uncomfortable of writing such a function. So, I decided to use MyString instead of returning a pointer of a static buffer.

Test required

Don't forget to below lists.

currently working on

KeyCache

KeyCache, uses sockaddr_in for storing ip addr. before modify, be sure to look at the overall picture. only used in condor_secman and daemon core.

KeyCacheEntry stores sockaddr_in. KeyCache converts sockaddr_in into sinful string and use the string as a key.

Sock::my_addr() can fail?

One of asymmetry in Sock class is that peer_addr() does not fail and always return a value but my_addr() can fail. ( peer_addr tells you the address of peer, my_addr() tells you the address of local socket)

The possible case for a failure of my_addr() is that when Sock class did not assign a socket descriptor.

In this case, peer_addr() can also fail.

Note for constants

Don't forget constants that should be adjusted!

MAXMACHNAME : seen in file_transfer_db.c, stores the result of sin_to_hostname.

IpVerify

[zach] implemented by mostly Todd, and little bit by Zach and Dan.

IpVerify verifies the remote process's ip from the configuration file. There are many lines that are referring to DCpermission. I am bit confused here. I do not understand what 'DCpermission' made for.

Ulrich Mystery

Ulrich's Userlevel IPv6 Programming Introductionn - http://people.redhat.com/drepper/userapi-ipv6.html

He denotes gethostbyaddr() as an obsolete. However, gethostbyaddr() accepts a socket type as a parameter. (AF_INET, AF_INET6) That means it should work well with IPv6. Why it is obsolete??

Converting Sock

Sock is not only used by TCP/UDP connection but also used by Unix domain socket (AF_UNIX). Basically, Sock can only create TCP or UDP socket internally but SharedEndPoint and SharedPortClient creates Unix domain socket and calls Sock::assign() to pass the descriptor.

I guess this is broken abstraction since Sock has IP related functions such as peer_addr() or peer_port() which are not available to Unix domain socket.

It seems assign() is only used by these Shared* thing. So maybe we could end up with refactoring it.

What is it?

TCP_FORWARDING_HOST ?