Defines | Functions | Variables

marnet.cpp File Reference

#include "marnet.h"
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include "marcmd.h"
Include dependency graph for marnet.cpp:

Go to the source code of this file.

Defines

#define MAX_TRY   1000
#define DATA_SIZE   16386
#define STAT_SIZE   404
#define MESS_SIZE   84
#define FD_MAX   FD_SETSIZE
#define SK_COMM   0
#define SK_STAT   1
#define SK_DATA   2
#define SK_MESS   3

Functions

void swaplong (char *, int)
void swapshort (char *, int)

Variables

static char net_buf [DATA_SIZE]
static char msg_buf [MESS_SIZE]
char net_timeout = 0
int mar_socket [4] = {-1, -1, -1, -1}
static char * sk_type [4] = { "COMM", "STAT", "DATA", "MESS"}
static char stop_trying = 0
char str [1024]
char scan_in_progress
int debug
int netcontrol
static struct timeval timeout

Define Documentation

#define DATA_SIZE   16386

Definition at line 37 of file marnet.cpp.

Referenced by MarNet::net_data().

#define FD_MAX   FD_SETSIZE
#define MAX_TRY   1000

Definition at line 36 of file marnet.cpp.

Referenced by MarNet::net_open().

#define MESS_SIZE   84

Definition at line 39 of file marnet.cpp.

Referenced by MarNet::net_msg().

#define SK_COMM   0

Definition at line 42 of file marnet.cpp.

Referenced by MarNet::net_comm().

#define SK_DATA   2

Definition at line 44 of file marnet.cpp.

Referenced by MarNet::net_data().

#define SK_MESS   3

Definition at line 45 of file marnet.cpp.

Referenced by MarNet::net_msg().

#define SK_STAT   1

Definition at line 43 of file marnet.cpp.

Referenced by MarNet::net_stat().

#define STAT_SIZE   404

Definition at line 38 of file marnet.cpp.

Referenced by MarNet::net_stat().


Function Documentation

void swaplong ( char *  ,
int   
)

Definition at line 129 of file utils.c.

{
        register int i, t1, t2, t3, t4;

        for(i=nbytes/4;i--;) {
                t1 = data[i*4+3];
                t2 = data[i*4+2];
                t3 = data[i*4+1];
                t4 = data[i*4+0];
                data[i*4+0] = t1;
                data[i*4+1] = t2;
                data[i*4+2] = t3;
                data[i*4+3] = t4;
        }
}
void swapshort ( char *  ,
int   
)

Variable Documentation

int debug
int mar_socket[4] = {-1, -1, -1, -1}
char msg_buf[MESS_SIZE] [static]

Definition at line 48 of file marnet.cpp.

Referenced by MarNet::net_msg().

char net_buf[DATA_SIZE] [static]

Definition at line 47 of file marnet.cpp.

Referenced by MarNet::net_data().

char net_timeout = 0

Definition at line 50 of file marnet.cpp.

Referenced by MarNet::net_comm(), MarNet::net_msg(), and MarNet::net_stat().

Definition at line 56 of file marxf.cpp.

char* sk_type[4] = { "COMM", "STAT", "DATA", "MESS"} [static]

Definition at line 52 of file marnet.cpp.

Referenced by MarNet::net_open().

char stop_trying = 0 [static]

Definition at line 53 of file marnet.cpp.

Referenced by MarNet::net_open(), and MarNet::stop_net().

char str[1024]

Definition at line 87 of file marglobals.h.

struct timeval timeout [static]