usc.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <signal.h>
#include <assert.h>
#include <errno.h>
#include "usc.h"
#include <stdarg.h>
#include <ctype.h>

Go to the source code of this file.

Defines

#define INCR(argc)   (argc<maxargs? argc++: argc)
#define DQUOTE   '"'
#define ISDQUOTE(c)   ((c) == DQUOTE)

Functions

int uscMake (struct UnixSocketConnection *cn)
int uscAccept (struct UnixSocketConnection *cn)
void uscClose (struct UnixSocketConnection *cn)
struct IoBufiobCreate (int in_max, int out_max)
int iobPrintf (struct Buf *buf, const char *fmt,...)
void iobDestroy (struct IoBuf *iob)
int split (char *str, char *argv[], int maxargs)
void iobFlush (struct IoBuf *iob, struct UnixSocketConnection *connection)


Define Documentation

#define DQUOTE   '"'

#define INCR ( argc   )     (argc<maxargs? argc++: argc)

Referenced by split().

#define ISDQUOTE (  )     ((c) == DQUOTE)

Referenced by split().


Function Documentation

struct IoBuf* iobCreate ( int  in_max,
int  out_max 
) [read]

Definition at line 111 of file usc.c.

References IoBuf::Buf::buf, IoBuf::in, IoBuf::Buf::maxlen, and IoBuf::out.

Referenced by batch_work(), interpreter(), and server_work().

void iobDestroy ( struct IoBuf iob  ) 

Definition at line 141 of file usc.c.

References IoBuf::Buf::buf, IoBuf::in, and IoBuf::out.

Referenced by server_work().

void iobFlush ( struct IoBuf iob,
struct UnixSocketConnection connection 
)

int iobPrintf ( struct Buf *  buf,
const char *  fmt,
  ... 
)

int split ( char *  str,
char *  argv[],
int  maxargs 
)

Definition at line 151 of file usc.c.

References INCR, and ISDQUOTE.

Referenced by doDebug(), mdsshell_doServerCommand(), and spawnCmd().

int uscAccept ( struct UnixSocketConnection cn  ) 

void uscClose ( struct UnixSocketConnection cn  ) 

Definition at line 104 of file usc.c.

References UnixSocketConnection::fd_active.

Referenced by new_state().

int uscMake ( struct UnixSocketConnection cn  ) 


Generated on Wed Feb 3 08:08:33 2010 for mdsshell by  doxygen 1.5.7.1