/* File ipxwatch.h : This file contains the data structures for the IPX protocol stack */ /* Copyright (C) 1992 Indian Institute of Technology, Bombay Written by V. Srinivas and Vishwas Joglekar, Dept of Computer Science and Engineering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define MAX_IPX_PKT_SIZE 1500 /* data portion of the IPX packet */ #define MAX_PKT_TYPES 8 #define MAX_SERVERS 7 /* No of servers info b'cast in a single server identification packet */ #define MAX_NETWORKS 7 #define MAX_HOPS 0x0f #define ETHER_ADDR_LEN 6 /* Socket numbers for novell pkts */ #define NETCOREP_SOCK 0x451 #define SERVADP_SOCK 0x452 #define ROUTEIPX_SOCK 0x453 #define NETB_SOCK 0x455 /* Netbios packet */ #define DIA_SOCK 0x456 /* diagnostic packet */ /* Novell packet types */ #define NOVLNCP 0 #define NOVLSAP 1 #define NOVLRIP 2 #define NOVLNB 3 #define NOVLDIAG 4 #define NOVLIPX 5 #define NOVLSPX 6 #define NONE 7 #ifndef WORD #define WORD unsigned short #endif #ifndef BYTE #define BYTE unsigned char #endif /* IPX/Internet address of a node */ typedef struct{ BYTE net_id[4]; BYTE node_id[6]; BYTE socket[2]; /* high - low */ } INTERNET_ADDRESS; typedef struct{ BYTE checksum[2]; BYTE length[2]; /* IPX packet length : MAX 576 bytes */ BYTE transport_control; BYTE packet_type; INTERNET_ADDRESS dest_node; INTERNET_ADDRESS source_node; } IPX_HEADER; typedef struct{ IPX_HEADER header; BYTE data[MAX_IPX_PKT_SIZE]; }IPX_PKT; typedef struct{ BYTE destination[6]; BYTE source[6]; BYTE type[2]; /* ether pkt type, 8137 for novell pkts */ IPX_PKT pkt; }ETH_IPX; /* In yapcbr.c & main.c */ struct rxstruct { ETH_IPX rcv_buffer; /* packet receive buffer */ WORD len; /* packet length */ int rcv_flag; /* SET if there is a valid packet in the buffer */ int dev; /* interface/segment on which the packet was received */ }; struct pkt_type_stat{ long pkt_count; /* no of pkts received */ long bytes_in; /* no of bytes received */ };