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

📄 bootp.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         */
/*                                                                          */
/*      bootp                                                 3.2           */
/*                                                                          */
/* DESCRIPTION                                                              */
/*                                                                          */
/*      This include file will handle bootstrap protocol defines -- RFC 951.*/
/*                                                                          */
/* 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 BOOTP_H
#define BOOTP_H

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

#define	BOOTREQUEST	1
#define	BOOTREPLY	2
/*
 * UDP port numbers, server and client.
 */
#define IPPORT_BOOTPS       67
#define IPPORT_BOOTPC       68

#define	VM_STANFORD	"STAN"	/* v_magic for Stanford */
#define VM_RFC1048      "\143\202\123\143"

/* v_flags values */
#define	VF_PCBOOT	1	/* an IBMPC or Mac wants environment info */
#define	VF_HELP		2	/* help me, I'm not registered */
#define TAG_BOOTFILE_SIZE       13     /* tag used by vend fields rfc 1048 */

#define BOOTP_RETRIES       6    /* The maximum number of times bootp will send
                                  * a request before giving up.     */
#define MAX_BOOTP_TIMEOUT   63   /* The maximum time bootp will wait for a
                                  * response before retransmitting a request. */

struct bootp
{
	uchar  bp_op;	   /* packet opcode type */
	uchar  bp_htype;   /* hardware addr type */
	uchar  bp_hlen;    /* hardware addr length */
	uchar  bp_hops;    /* gateway hops */
	ulint  bp_xid;	   /* transaction ID */
	ushort bp_secs;    /* seconds since boot began */
	ushort bp_unused;
    struct id_struct bp_ciaddr;  /* client IP address */
    struct id_struct bp_yiaddr;  /* 'your' IP address */
    struct id_struct bp_siaddr;  /* server IP address */
    struct id_struct bp_giaddr;  /* gateway IP address */
	uchar  bp_chaddr[16];  /* client hardware address */
	uchar  bp_sname[64];   /* server host name */
	uchar  bp_file[128];   /* boot file name */
	uchar  bp_vend[64];    /* vendor-specific area */
};

/*
 * "vendor" data permitted for Stanford boot clients.
 */
struct vend
{
	uchar  v_magic[4]; /* magic number */
	ulint  v_flags;    /* flags/opcodes, etc. */
	uchar  v_unused[56];   /* currently unused */
};
#endif	/* BOOTP_H */

⌨️ 快捷键说明

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