/* File sap.h : This file contains the data structures for the Service Advertising Protocol */ /* 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. */ /* Novell Server Types */ #define FILE_SERVER 0004 /* SAP packet types */ #define SERV_IDENT_PKT 0002 #define GIVE_NEAREST_SERVER 0004 #define GET_NEAREST_SERVER 0003 #define QUERY_PKT_SIZE 0034 typedef struct{ BYTE server_type[2]; char server_name[48]; INTERNET_ADDRESS sap_node; WORD hops_to_server; } SAP_INFO; typedef struct{ IPX_HEADER header; BYTE resp_type[2]; union { SAP_INFO server_info[MAX_SERVERS]; /* server ident pkt */ BYTE server_type[2]; /* service query broadcast */ }sap_data; }SAP_PKT; struct sap_tbl{ char server_name[48]; INTERNET_ADDRESS server_address; WORD server_type; WORD hops_to_server; /* high - low */ WORD elapsed_time; /* high - low */ int dev; /* interface number */ struct sap_tbl *next; };