#include <stdio.h>#include <string.h>#include <netinet/in.h>#include <unistd.h>#include <stdarg.h>#include <netdb.h>#include <stdlib.h>#include <net/if.h>#include <sys/ioctl.h>#include <ctype.h>#include "ipx_drv.h"#include "args.h"Defines | |
| #define | UDP_BASEPORT 28342 |
| #define | PORTSHIFT_TOLERANCE 0x100 |
| #define | MAX_PACKETSIZE 8192 |
| #define | D1Xudp "D1Xudp" |
| #define | D1Xid "\xD1X" |
| #define | MSGHDR "IPX_udp: " |
| #define | FAIL(m...) do { msg(#m); return -1; } while (0) |
| #define | MAX_BRDINTERFACES 16 |
| #define | IF_REQFLAGS (IFF_UP|IFF_RUNNING) |
| #define | IF_NOTFLAGS (IFF_LOOPBACK) |
| #define | addreq(a, b) ((a).sin_port==(b).sin_port&&(a).sin_addr.s_addr==(b).sin_addr.s_addr) |
Functions | |
| static int | have_empty_address () |
| static void | msg (const char *fmt,...) |
| static void | chk (void *p) |
| static void | chkbroadsize (void) |
| static int | addiflist (void) |
| static void | unifyiflist (void) |
| static void | portshift (const char *cs) |
| static unsigned char * | queryhost (char *buf) |
| static void | dumpraddr (unsigned char *a) |
| static void | dumpaddr (struct sockaddr_in *sin) |
| static int | ipx_udp_GetMyAddress (void) |
| static int | ipx_udp_OpenSocket (ipx_socket_t *sk, int port) |
| static void | ipx_udp_CloseSocket (ipx_socket_t *mysock) |
| static int | ipx_udp_SendPacket (ipx_socket_t *mysock, IPXPacket_t *IPXHeader, u_char *data, int dataLen) |
| static int | ipx_udp_ReceivePacket (ipx_socket_t *s, char *outbuf, int outbufsize, struct ipx_recv_data *rd) |
Variables | |
| unsigned char | ipx_MyAddress [10] |
| static int | open_sockets = 0 |
| static int | dynamic_socket = 0x401 |
| static const int | val_one = 1 |
| static int | baseport = UDP_BASEPORT |
| static char | compatibility = 0 |
| static struct sockaddr_in * | broads |
| static struct sockaddr_in | broadmasks [MAX_BRDINTERFACES] |
| static int | broadnum |
| static int | masksnum |
| static int | broadsize |
| static unsigned char | qhbuf [6] |
| ipx_driver | ipx_udp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initial value: |
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6