home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NET-TOOL.1 / NET-TOOL / net-tools / lib / support.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-18  |  1.5 KB  |  55 lines

  1. /*
  2.  * support.h    This file contains the definitions of what is in the
  3.  *        support library.  Most of all, it defines structures
  4.  *        for accessing support modules, and the function proto-
  5.  *        types.
  6.  *
  7.  * Version:    @(#)support.h    1.10    10/07/93
  8.  *
  9.  * Author:    Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  10.  *        Copyright 1993 MicroWalt Corporation
  11.  *
  12.  *        This program is free software; you can redistribute it
  13.  *        and/or  modify it under  the terms of  the GNU General
  14.  *        Public  License as  published  by  the  Free  Software
  15.  *        Foundation;  either  version 2 of the License, or  (at
  16.  *        your option) any later version.
  17.  */
  18.  
  19.  
  20. /* This structure defines protocol families and their handlers. */
  21. struct aftype {
  22.   char        *name;
  23.   char        *title;
  24.   int        af;
  25.   int        alen;
  26.   char        *(*print)    (unsigned char *);
  27.   char        *(*sprint)    (struct sockaddr *, int numeric);
  28.   int        (*input)    (char *bufp, struct sockaddr *);
  29.   void        (*herror)    (char *text);
  30. };
  31.  
  32.  
  33. /* This structure defines hardware protocols and their handlers. */
  34. struct hwtype {
  35.   char        *name;
  36.   char        *title;
  37.   int        type;
  38.   int        alen;
  39.   char        *(*print)    (unsigned char *);
  40.   char        *(*sprint)    (struct sockaddr *);
  41.   int        (*input)    (char *, struct sockaddr *);
  42.   int        (*activate)    (int fd);
  43. };
  44.  
  45.  
  46. extern struct hwtype    *get_hwtype(char *name);
  47. extern struct hwtype    *get_hwntype(int type);
  48. extern struct aftype    *get_aftype(char *name);
  49. extern struct aftype    *get_afntype(int type);
  50.  
  51. extern char        *getsock(char *bufp, struct sockaddr *sap);
  52. extern int               getargs(char *string, char *arguments[]);
  53.  
  54. /* End of support.h */
  55.