mdsshell.af_inet.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <assert.h>
#include <errno.h>
#include "local.h"
#include "usc.h"
#include "mdsshell.h"
#include <popt.h>
#include <stdarg.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "skel.h"

Go to the source code of this file.

Defines

#define VERID
#define PROCLOGNAME   "mdsshell"
#define NLISTEN   20
#define MAXBUF   4096

Functions

void error (int status, int err, char *fmt,...)
static void set_address (const char *hname, const char *sname, struct sockaddr_in *sap, char *protocol)
void prompt (int command, FILE *fd)
int readline (SOCKET fd, char *bufptr, size_t len)
void interpreter (SOCKET s)
static void server (SOCKET s, struct sockaddr_in *peerp)
static void reaper (int sig)
static const char * verid (void)
static SOCKET build_socket (void)
static int help (void)
int main (int argc, const char **argv)

Variables

unsigned S_BUFLEN = SKT_BUFLEN
const char * program_name
const char * mdsshell_rev
int acq200_debug


Define Documentation

#define MAXBUF   4096

Definition at line 216 of file mdsshell.af_inet.c.

Referenced by client(), client_work(), and interpreter().

#define NLISTEN   20

Definition at line 154 of file mdsshell.af_inet.c.

#define PROCLOGNAME   "mdsshell"

Definition at line 45 of file mdsshell.af_inet.c.

#define VERID

Value:

"$Id: mdsshell.af_inet.c,v 1.8 2005/11/15 16:55:13 pgm Exp $" \
    "$Revision: 1.8 $ "\
    "BUILD 1005\n"

Definition at line 21 of file mdsshell.af_inet.c.

Referenced by verid().


Function Documentation

static SOCKET build_socket ( void   )  [static]

Definition at line 303 of file mdsshell.af_inet.c.

References error(), and S_BUFLEN.

Referenced by main().

void error ( int  status,
int  err,
char *  fmt,
  ... 
)

Definition at line 165 of file mdsshell.af_inet.c.

References program_name.

Referenced by build_socket(), main(), and set_address().

static int help ( void   )  [static]

Definition at line 327 of file mdsshell.af_inet.c.

Referenced by main().

void interpreter ( SOCKET  s  ) 

this prompt used for transaction decode

this prompt for interactive visual aesthetic

Definition at line 226 of file mdsshell.af_inet.c.

References IoBuf::Buf::buf, IoBuf::in, iobCreate(), IoBuf::Buf::len, MAXBUF, mdsshell_doServerCommand(), IoBuf::out, prompt(), and readline().

Referenced by server().

int main ( int  argc,
const char **  argv 
)

void prompt ( int  command,
FILE *  fd 
)

Definition at line 219 of file mdsshell.af_inet.c.

Referenced by interpreter().

int readline ( SOCKET  fd,
char *  bufptr,
size_t  len 
)

Definition at line 4 of file readline.c.

static void reaper ( int  sig  )  [static]

Definition at line 280 of file mdsshell.af_inet.c.

Referenced by main().

static void server ( SOCKET  s,
struct sockaddr_in *  peerp 
) [static]

Definition at line 261 of file mdsshell.af_inet.c.

References interpreter().

Referenced by main().

static void set_address ( const char *  hname,
const char *  sname,
struct sockaddr_in *  sap,
char *  protocol 
) [static]

Definition at line 180 of file mdsshell.af_inet.c.

References error().

static const char* verid ( void   )  [static]

Definition at line 291 of file mdsshell.af_inet.c.

References mdsshell_rev, and VERID.

Referenced by main().


Variable Documentation

const char* mdsshell_rev

Definition at line 224 of file mdsshell.c.

Referenced by main(), and verid().

const char* program_name

Definition at line 161 of file mdsshell.af_inet.c.

Referenced by error().

unsigned S_BUFLEN = SKT_BUFLEN

Definition at line 158 of file mdsshell.af_inet.c.

Referenced by build_socket().


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