--portspec baseport connections |
--logfile logfilename |
--dontfork |
--user username |
--port port |
--help |
--version |
--maxconn seconds |
--command commandsocketfile |
byte0 byte 1 | Number of bytes in the command (network byte order) |
byte 2 | Command code: 1 = ADD (Add a port/nym map) 2 = DEL (Delete all maps for a nym) format after the command byte depends on the command: ADD: byte 3 byte 4 Server port in network byte order byte 5 byte 6 Client port in network byte order byte 7... end Name of the nym which owns the pair DEL byte 3... end Name of the nym you wish to delete |
struct sockaddr_un addr; /* Address of the identd */ char * name; char mesg[128]; int size; unsigned short client,server; name = "FOOBAR"; client = 34567; server = 23; addr.sun_family = AF_UNIX; strcpy(addr.sun_path,"/tmp/zkidentd.cmd"); size = 7 + strlen(name); mesg[0] = size / 0x100; mesg[1] = size % 0x100; mesg[2] = 1; mesg[3] = server / 0x100; mesg[4] = server % 0x100; mesg[5] = client / 0x100; mesg[6] = client % 0x100; memcpy(&(mesg[7]),tok,strlen(tok)); sendto(uds,mesg,size,0,&addr,sizeof(addr));This second code example is used to remove the entries associated with a particular nym
struct sockaddr_un addr; /* Address of the identd */ char * name; char mesg[128]; int size; name = "FOOBAR"; addr.sun_family = AF_UNIX; strcpy(addr.sun_path,"/tmp/zkidentd.cmd"); size = 3 + strlen(name); mesg[0] = size / 0x100; mesg[1] = size % 0x100; mesg[2] = 2; memcpy(&(mesg[3]),name,strlen(name)); sendto(uds,mesg,size,0,&addr,sizeof(addr));