]>
git.saurik.com Git - apple/network_cmds.git/blob - tcpdump.tproj/bootp.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
24 /* @(#) $Header: /cvs/Darwin/Commands/NeXT/network_cmds/tcpdump.tproj/bootp.h,v 1.1.1.1 1999/05/02 03:58:31 wsanchez Exp $ (LBL) */
26 * Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
28 * This file specifies the "implementation-independent" BOOTP protocol
29 * information which is common to both client and server.
31 * Copyright 1988 by Carnegie Mellon.
33 * Permission to use, copy, modify, and distribute this program for any
34 * purpose and without fee is hereby granted, provided that this copyright
35 * and permission notice appear on all copies and supporting documentation,
36 * the name of Carnegie Mellon not be used in advertising or publicity
37 * pertaining to distribution of the program without specific prior
38 * permission, and notice be given in supporting documentation that copying
39 * and distribution is by permission of Carnegie Mellon and Stanford
40 * University. Carnegie Mellon makes no representations about the
41 * suitability of this software for any purpose. It is provided "as is"
42 * without express or implied warranty.
47 unsigned char bp_op
; /* packet opcode type */
48 unsigned char bp_htype
; /* hardware addr type */
49 unsigned char bp_hlen
; /* hardware addr length */
50 unsigned char bp_hops
; /* gateway hops */
51 u_int32_t bp_xid
; /* transaction ID */
52 unsigned short bp_secs
; /* seconds since boot began */
53 unsigned short bp_unused
;
54 struct in_addr bp_ciaddr
; /* client IP address */
55 struct in_addr bp_yiaddr
; /* 'your' IP address */
56 struct in_addr bp_siaddr
; /* server IP address */
57 struct in_addr bp_giaddr
; /* gateway IP address */
58 unsigned char bp_chaddr
[16]; /* client hardware address */
59 unsigned char bp_sname
[64]; /* server host name */
60 unsigned char bp_file
[128]; /* boot file name */
61 unsigned char bp_vend
[64]; /* vendor-specific area */
65 * UDP port numbers, server and client.
67 #define IPPORT_BOOTPS 67
68 #define IPPORT_BOOTPC 68
75 * Vendor magic cookie (v_magic) for CMU
80 * Vendor magic cookie (v_magic) for RFC1048
82 #define VM_RFC1048 { 99, 130, 83, 99 }
87 * RFC1048 tag values used to specify what information is being supplied in
88 * the vendor field of the packet.
91 #define TAG_PAD ((unsigned char) 0)
92 #define TAG_SUBNET_MASK ((unsigned char) 1)
93 #define TAG_TIME_OFFSET ((unsigned char) 2)
94 #define TAG_GATEWAY ((unsigned char) 3)
95 #define TAG_TIME_SERVER ((unsigned char) 4)
96 #define TAG_NAME_SERVER ((unsigned char) 5)
97 #define TAG_DOMAIN_SERVER ((unsigned char) 6)
98 #define TAG_LOG_SERVER ((unsigned char) 7)
99 #define TAG_COOKIE_SERVER ((unsigned char) 8)
100 #define TAG_LPR_SERVER ((unsigned char) 9)
101 #define TAG_IMPRESS_SERVER ((unsigned char) 10)
102 #define TAG_RLP_SERVER ((unsigned char) 11)
103 #define TAG_HOSTNAME ((unsigned char) 12)
104 #define TAG_BOOTSIZE ((unsigned char) 13)
105 #define TAG_END ((unsigned char) 255)
107 #define TAG_DUMPPATH ((unsigned char) 14)
108 #define TAG_DOMAINNAME ((unsigned char) 15)
109 #define TAG_SWAP_SERVER ((unsigned char) 16)
110 #define TAG_ROOTPATH ((unsigned char) 17)
111 #define TAG_EXTPATH ((unsigned char) 18)
116 * "vendor" data permitted for CMU bootp clients.
120 unsigned char v_magic
[4]; /* magic number */
121 u_int32_t v_flags
; /* flags/opcodes, etc. */
122 struct in_addr v_smask
; /* Subnet mask */
123 struct in_addr v_dgate
; /* Default gateway */
124 struct in_addr v_dns1
, v_dns2
; /* Domain name servers */
125 struct in_addr v_ins1
, v_ins2
; /* IEN-116 name servers */
126 struct in_addr v_ts1
, v_ts2
; /* Time servers */
127 unsigned char v_unused
[24]; /* currently unused */
132 #define VF_SMASK 1 /* Subnet mask field contains valid data */