Go to the source code of this file.
typedef int(* CcsSecMan_allowFn)(struct CcsSecMan *self, CcsSecAttr *attr) |
Definition at line 21 of file ccs-server.C.
typedef CcsSec_secretKey*(* CcsSecMan_getKeyFn)(struct CcsSecMan *self, CcsSecAttr *attr) |
Definition at line 23 of file ccs-server.C.
static void CCS_AUTH_new | ( | CCS_AUTH_clients * | cl | ) | [static] |
Definition at line 39 of file ccs-server.C.
References CCS_RAND_new(), CCS_AUTH_clients::clients, CCS_AUTH_clients::nClients, and CCS_AUTH_clients::rand.
Referenced by CcsServer_new().
static int CCS_AUTH_numClients | ( | CCS_AUTH_clients * | cl | ) | [static] |
Definition at line 45 of file ccs-server.C.
References CCS_AUTH_clients::nClients.
Referenced by CcsServer_SHA1_message().
static int CCS_AUTH_addClient | ( | CCS_AUTH_clients * | cl | ) | [static] |
Definition at line 48 of file ccs-server.C.
References CCS_RAND_next(), CCS_AUTH_clients::clients, CCS_AUTH_clients::nClients, CCS_AUTH_clients::rand, and realloc().
Referenced by CcsServer_createSalt().
static int CCS_AUTH_clientSalt | ( | CCS_AUTH_clients * | cl, | |
int | clientNo | |||
) | [static] |
Definition at line 55 of file ccs-server.C.
References CCS_AUTH_clients::clients.
Referenced by CcsServer_createSalt(), and CcsServer_SHA1_message().
static void CCS_AUTH_advanceSalt | ( | CCS_AUTH_clients * | cl, | |
int | clientNo | |||
) | [static] |
Definition at line 58 of file ccs-server.C.
References CCS_AUTH_clients::clients.
Referenced by CcsServer_SHA1_message().
static void CcsServer_writeReply | ( | SOCKET | fd, | |
CcsSecMan * | security, | |||
CcsSecAttr * | attr, | |||
int | replyLen, | |||
char * | reply | |||
) | [static] |
Definition at line 68 of file ccs-server.C.
References CcsSecAttr::auth, CCS_AUTH_hash(), ChMessageInt(), ChMessageInt_new(), CcsSecMan::getKey, len, CcsSecAttr::replySalt, skt_close(), and skt_sendV().
Referenced by CcsServer_sendReply().
static const char* CcsServer_createSalt | ( | SOCKET | fd, | |
CCS_AUTH_clients * | cl, | |||
CcsSecMan * | security, | |||
CcsSecAttr * | attr | |||
) | [static] |
Definition at line 110 of file ccs-server.C.
References CCS_AUTH_addClient(), CCS_AUTH_clientSalt(), CCS_AUTH_differ(), CCS_AUTH_hash(), CCS_RAND_next(), ChMessageInt(), ChMessageInt_new(), CcsSecMan::getKey, CCS_AUTH_clients::rand, skt_recvN(), and skt_sendN().
Referenced by CcsServer_readHeader().
static const char* CcsServer_SHA1_message | ( | SOCKET | fd, | |
CCS_AUTH_clients * | cl, | |||
CcsSecMan * | security, | |||
CcsSecAttr * | attr, | |||
CcsMessageHeader * | hdr | |||
) | [static] |
Definition at line 149 of file ccs-server.C.
References CCS_AUTH_advanceSalt(), CCS_AUTH_clientSalt(), CCS_AUTH_differ(), CCS_AUTH_numClients(), ChMessageInt(), CcsSecMan::getKey, CcsSecAttr::replySalt, and skt_recvN().
Referenced by CcsServer_readHeader().
static const char* CcsServer_readHeader | ( | SOCKET | fd, | |
CCS_AUTH_clients * | cl, | |||
CcsSecMan * | security, | |||
CcsSecAttr * | attr, | |||
CcsMessageHeader * | hdr | |||
) | [static] |
Definition at line 185 of file ccs-server.C.
References CcsSecMan::allowRequest, CcsSecAttr::auth, CcsServer_createSalt(), CcsServer_SHA1_message(), ChMessageInt_new(), CcsMessageHeader::handler, CcsMessageHeader::len, len, CcsSecAttr::level, CcsMessageHeader::pe, CcsSecAttr::replySalt, and skt_recvN().
Referenced by CcsServer_recvRequestData().
static int allowRequest_default | ( | struct CcsSecMan * | self, | |
CcsSecAttr * | attr | |||
) | [static] |
Definition at line 241 of file ccs-server.C.
References CcsSecAttr::auth, and CcsSecAttr::level.
Referenced by CcsSecMan_default().
static CcsSec_secretKey* getKey_default | ( | struct CcsSecMan * | self, | |
CcsSecAttr * | attr | |||
) | [static] |
Definition at line 253 of file ccs-server.C.
References CcsSecAttr::level.
Referenced by CcsSecMan_default().
static void CcsSecMan_make_otp | ( | const char * | str, | |
CcsSec_secretKey * | key | |||
) | [static] |
Definition at line 258 of file ccs-server.C.
References CCS_RAND_new(), CCS_RAND_next(), CcsSec_secretKey::data, and CCS_RAND_state::state.
Referenced by CcsSecMan_default().
static void CcsSecMan_printkey | ( | FILE * | out, | |
int | level, | |||
CcsSec_secretKey * | k | |||
) | [static] |
Definition at line 277 of file ccs-server.C.
References CcsSec_secretKey::data.
Referenced by CcsSecMan_default().
static CcsSecMan* CcsSecMan_default | ( | const char * | authFile | ) | [static] |
Definition at line 286 of file ccs-server.C.
References CcsSecMan::allowRequest, allowRequest_default(), CCS_AUTH_makeSecretKey(), CcsSecMan_make_otp(), CcsSecMan_printkey(), CcsSec_secretKey::data, CcsSecMan::getKey, getKey_default(), key, CcsSecMan::keys, level, and malloc().
Referenced by CcsServer_new().
Definition at line 344 of file ccs-server.C.
References CCS_AUTH_new(), CcsSecMan_default(), skt_init(), skt_my_ip(), skt_print_ip(), and skt_server().
Referenced by arg_init(), and CcsInit().
SOCKET CcsServer_fd | ( | void | ) |
Definition at line 365 of file ccs-server.C.
Referenced by arg_init(), and CcsServerCheck().
Definition at line 372 of file ccs-server.C.
Referenced by CcsServer_recvRequest().
static int CcsServer_recvRequestData | ( | SOCKET | fd, | |
CcsImplHeader * | hdr, | |||
void ** | reqData | |||
) | [static] |
Definition at line 378 of file ccs-server.C.
References CcsImplHeader::attr, CcsServer_readHeader(), ChMessageInt(), ChMessageInt_new(), free(), CcsMessageHeader::handler, CcsImplHeader::handler, CcsMessageHeader::len, CcsImplHeader::len, malloc(), CcsMessageHeader::pe, CcsImplHeader::pe, CcsImplHeader::replyFd, and skt_recvN().
Referenced by CcsServer_recvRequest().
int CcsServer_recvRequest | ( | CcsImplHeader * | hdr, | |
void ** | reqData | |||
) |
Definition at line 413 of file ccs-server.C.
References CcsImplHeader::attr, CcsServer_recvRequestData(), ChMessageInt_new(), fd, CcsSecAttr::ip, CcsSecAttr::port, req_abortFn(), skt_accept(), skt_close(), skt_print_ip(), and skt_set_abort().
Referenced by arg_init(), and CcsServerCheck().
Definition at line 443 of file ccs-server.C.
Referenced by arg_init(), and CcsServer_sendReply().
void CcsServer_sendReply | ( | CcsImplHeader * | hdr, | |
int | repBytes, | |||
const void * | repData | |||
) |
Definition at line 453 of file ccs-server.C.
References CcsImplHeader::attr, CcsServer_writeReply(), ChMessageInt(), fd, CcsImplHeader::len, reply_abortFn(), CcsImplHeader::replyFd, skt_close(), and skt_set_abort().
Referenced by arg_init(), CcsImpl_reply(), check_stdio_header(), and write_stdio_duplicate().
void write_stdio_duplicate | ( | char * | data | ) |
Definition at line 483 of file ccs-server.C.
References CcsServer_sendReply(), free(), malloc(), and size.
Referenced by arg_init(), print_fw_handler(), and print_node0().
int check_stdio_header | ( | CcsImplHeader * | hdr | ) |
Definition at line 506 of file ccs-server.C.
References CcsServer_sendReply(), ChMessageInt_new(), CcsImplHeader::handler, CcsImplHeader::len, and malloc().
Referenced by arg_init(), and CcsServerCheck().
void print_fw_handler | ( | char * | msg | ) |
Definition at line 546 of file ccs-server.C.
References write_stdio_duplicate().
Referenced by CcsInit().
void print_node0 | ( | const char * | format, | |
va_list | args | |||
) |
Definition at line 551 of file ccs-server.C.
References CmiAbort(), CmiAlloc(), CmiMyPe(), Converse::CmiSyncSendAndFree(), len, msg, and write_stdio_duplicate().
Referenced by CmiError(), and CmiPrintf().
SOCKET ccs_server_fd = SOCKET_ERROR [static] |
Definition at line 337 of file ccs-server.C.
CCS_AUTH_clients ccs_clientlist [static] |
Definition at line 338 of file ccs-server.C.
Definition at line 339 of file ccs-server.C.
char* stdio_buffer = NULL |
Definition at line 477 of file ccs-server.C.
int stdio_size = 0 |
Definition at line 478 of file ccs-server.C.
int stdio_alloc = 0 |
Definition at line 479 of file ccs-server.C.
int stdio_waiting = 0 |
Definition at line 480 of file ccs-server.C.
Definition at line 481 of file ccs-server.C.