Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

sipc.cc File Reference

Services IPC Methods. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "services.h"
#include "options.h"
#include "sipc.h"
#include "nickserv.h"
#include "chanserv.h"
#include "hash/md5.h"
#include "hash/md5pw.h"
#include "log.h"

Go to the source code of this file.

Classes

struct  ssUInfo
 An IPC system login. More...


Defines

#define ORNL(q)   (((size_t) &((RegNickList *)0)->q))

Functions

int NickGetEnc (RegNickList *)
 Get a registered nick encryption prefix.

int ChanGetEnc (RegChanList *)
 Get the encryption status of a registered channel object.

const char * GetAuthChKey (const char *, const char *, time_t, u_int32_t)
const char * PrintPass (u_char pI[], char enc)
 Print a password appropriately encoded according to its encryption type (if applicable).

const ssUInfogetServicesSysUser (const char *username)
int queryRnickString (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickStringFixed (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickFlag (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickLong (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickUint (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickUchar (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int queryRnickTime (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickStringD (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickStringFixed (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickEmail (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickFlag (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickLong (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickUint (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickUchar (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int alterRnickTime (RegNickList *rnl, IpcConnectType *p, parse_t *pb, int x)
int doNonBlock (int listenDesc)
 Make a connection endpoint non-blocking.

int isQlined (const char *nick)
 Is nick ``qlined''?


Variables

FILE * corelog
 Logfile to record system errors/debug information.

int ipcPort = 0
 Port number for services IPC server to listen on.

RegId top_regnick_idnum
struct {
   const char *   field
   int(*   func )(RegNickList *, IpcConnectType *p, parse_t *pb, int x)
   size_t   off
   flag_t   priv
   flag_t   a_priv
   int(*   a_func )(RegNickList *, IpcConnectType *p, parse_t *pb, int x)
rnickQueryTable []


Detailed Description

Services IPC Methods.

Procedures for talking with other software

Author:
James Hess
Date:
2001
Id
sipc.cc,v 1.1.1.1 2003/07/04 02:56:49 Mysid Exp

Definition in file sipc.cc.


Function Documentation

int ChanGetEnc RegChanList *  rcl  ) 
 

Get the encryption status of a registered channel object.

Returns:
$ for MD5 encrypted, @ for plaintext

Definition at line 861 of file chanserv.c.

References CENCRYPT.

Referenced by IpcType::alterObjMessage(), and IpcType::authObjMessage().

int doNonBlock int  listenDesc  ) 
 

Make a connection endpoint non-blocking.

Parameters:
File descriptor of endpoint
Returns:
0 on success, -1 on failure

Definition at line 557 of file sipc.cc.

Referenced by IpcType::pollAndHandle(), and IpcType::start().

const char* GetAuthChKey const char *  email,
const char *  password,
time_t  timereg,
u_int32_t  code_arg
 

Precondition:
Email and Password point to valid NUL-terminated character arrays. Timereg is a valid UTC calendar time, and code_arg is a code generated at random.
Returns:
An authentication key for password changes based on a hash of all data
Parameters:
email The user e-mail address
password The value of the nick or channel password structure
code_arg The selected change code

Definition at line 298 of file passwd.c.

Referenced by IpcType::authObjMessage().

int NickGetEnc RegNickList *  rnl  ) 
 

Get a registered nick encryption prefix.

Returns:
$ for encrypted or @ for plaintext

Definition at line 400 of file nickserv.c.

References NENCRYPT.

const char* PrintPass u_char  pI[],
char  enc
 

Print a password appropriately encoded according to its encryption type (if applicable).

Parameters:
p Password field
enc Encryption status
Precondition:
pI is a NUL-terminated character array.
Returns:
A pointer to a static NUL-terminated character array containing the printable version of a password

Definition at line 440 of file passwd.c.

References toBase64().

Referenced by IpcType::authObjMessage().


Generated at Sat Oct 25 20:56:12 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.