⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hostform.h

📁 mcf5307实验源代码
💻 H
字号:
/****************************************************************************/
/*																			*/
/*      Copyright (c) 1993 - 1996 by Accelerated Technology, Inc.           */
/*																			*/
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the subject */
/* matter of this material.  All manufacturing, reproduction, use and sales */
/* rights pertaining to this subject matter are governed by the license 	*/
/* agreement.  The recipient of this software implicity accepts the terms	*/
/* of the license.															*/
/*																			*/
/****************************************************************************/
/****************************************************************************/
/*                                                                          */
/* FILENAME                                               VERSION           */
/*                                                                          */
/*      hostform                                            3.2             */
/*                                                                          */
/* DESCRIPTION                                                              */
/*                                                                          */
/*      This include file will all the host and local machine configuration */
/*      information structures, and defines.                                */
/*                                                                          */
/* AUTHOR                                                                   */
/*                                                                          */
/*      Craig L. Meredith, Accelerated Technology Inc.                      */
/*                                                                          */
/* DATA STRUCTURES                                                          */
/*                                                                          */
/*      global compenent data stuctures defined in this file                */
/*                                                                          */
/* FUNCTIONS                                                                */
/*                                                                          */
/*      No functions defined in this file                                   */
/*                                                                          */
/* DEPENDENCIES                                                             */
/*                                                                          */
/*      No other file dependencies                                          */
/*                                                                          */
/* HISTORY                                                                  */
/*                                                                          */
/*      NAME                            DATE            REMARKS             */
/*                                                                          */
/*      Craig L. Meredith       04/10/93        Initial version.            */
/*      Craig L. Meredith       08/17/93        Added header, Neil's mods.  */
/*                                                                          */
/****************************************************************************/

#ifndef HOSTFORM_H
#define HOSTFORM_H

#include "socketd.h"
#include "target.h"

/*
*  Linked list of structures which describe other machines to which
*  our node might want to connect to.  It is preset in 'tcpvars.c'.
*/
struct machinfo
{
    char sname[32];             /* pointer to name of session */
    char hname[32];             /* pointer to name of that machine */
    struct id_struct hostip;    /* IP number of this machine */
    uchar gateway;              /* gateway preference, start with 1 */
    uchar nameserv;             /* nameserver preference, start with 1 */
    uchar halfdup;              /* half duplex required */
    uchar pad;
    sshort port;                /* TCP port number to access, default = 23 (telnet) */
    uint16 mno;                 /* machine number for reference */
    sshort mstat;               /* status of this machine entry */
    uint16 retrans;             /* initial retrans timeout */
    sshort conto;               /* time out in seconds to wait for connect */
    uint16 window;              /* window, will be checked against buffers */
    uint16 maxseg;              /* maximum receivable segment size */
    uint16 mtu;                 /* maximum transfer unit MTU (out) */
    struct machinfo *next;      /* surprise, its a linked list! */
};

/*
*  status fields for mstat, what do we know about that machine?
*/
#define NOIP    1               /* we don't have IP number */
#define UDPDOM  3               /* there is a UDP request pending on it */
                                /* The next 20 numbers are reserved for UDPDOM */
#define HAVEIP  50              /* at least we have the # */
#define HFILE   70              /* we have IP number from host file */

/* Configuration information which is setup in 'tcpvars.c'. */
struct config
{
    uchar netmask[4];         /* subnetting mask being used */
    uchar myipnum[4];         /* what is my IP #? */
    uchar broadip[4];         /* IP broadcast address */
    schar me[32];             /* my name description (first 30 chars) */
    uint32 address;           /* True 32 bits input/output (shared) memory base address */
    uint32 ioaddr;            /* I/O base address of hardware */
    sint nstype;              /* nameserver = 1-domain 2-IEN116  */
    sint ndom;                /* number of retries for domain requests */
    uint wire:1;              /* what type of connector? (thin or thick)*/
    uchar irqnum;             /* which hardware interrupt */
    uchar pad[1];             /* Padding for processors that require word
                                 alignment */
};

#endif  /* HOSTFORM_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -