/* File yapcbr.h : */ /* 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. */ #include #include #include #include #include #define NULLDEV (int ) -1 #define NULLHPTR (struct sap_tbl *)0 /* Null hash table pointer */ /* standard boolean constants */ #define FALSE 0 #define TRUE 1 #define NO 0 #define YES 1 #define ZERO 0 #define SET 1 #define RESET 0 #define FOUND 1 #define NOTFOUND 0 #define MAX_PRIME 211 /* modulus for hashing function */ #define MAX_QSIZ 12 /* global packet buffer queue size */ #define MAX_PKT_SIZE 1520 /* ethernet packet size */ #define FLUSH_TIME 300 /* life of the routing table/sap table entries in secs */ /* ascii codes of keys */ #define ESC 27 #define CR 13 #define UP_ARROW 72 #define DOWN_ARROW 80 /* for screen manipulation */ #define NORMAL 1 #define REVERSE 0 #define movblock(so,ss,do,ds,c) movedata(ss,so,ds,do,c) #define PK_MAX 4 /* max number of segments supported, increase this if you need more segments */ /* Packet driver interface classes */ #define CL_ETHERNET 1 #define EADDR_LEN 6 /* Packet driver function call numbers. From Appendix B. */ #define DRIVER_INFO 1 #define ACCESS_TYPE 2 #define RELEASE_TYPE 3 #define SEND_PKT 4 #define TERMINATE 5 #define GET_ADDRESS 6 #define SET_RCV_MODE 20 #define CARRY_FLAG 0x1 /* ethernet types : Blue book - ETHERNET_II */ #define ETHERNET_II 0 #define ARCETHER 1 /* largest size of a legal ethernet packet excluding fcs */ #define ETHER_PKT_LEN 1514 /* In yapcbr.c & main.c */ struct ipxpktdv{ int class; /* Interface class (ether ..) */ int intno; /* Interrupt vector */ short handle; /* Driver handle */ int ether_type; /* ethernet type, Blue book or 802.3 */ int dev; /* device number of this interface */ char *name; /* name of the interface */ unsigned char eaddr[6]; /* ethernet address of the interface */ unsigned char net_id[4]; /* network address of the interface */ int tmp_tail; }; extern struct ipxpktdv; /* screen manipulation macros */ #define restore() textbackground(BLACK); \ textcolor(WHITE); \ lowvideo() #define reverse() textbackground(WHITE); \ textcolor(BLACK); \ lowvideo() #define bzero(x,len) memset(x,0x00,len) /* End of YAPCBR.h */