1
2#ifndef _S_MACNC_OPTIONS_H
3#define _S_MACNC_OPTIONS_H
4
5/*
6 * Copyright (c) 1999 Apple Inc. All rights reserved.
7 *
8 * @APPLE_LICENSE_HEADER_START@
9 *
10 * This file contains Original Code and/or Modifications of Original Code
11 * as defined in and that are subject to the Apple Public Source License
12 * Version 2.0 (the 'License'). You may not use this file except in
13 * compliance with the License. Please obtain a copy of the License at
14 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * file.
16 *
17 * The Original Code and all software distributed under the License are
18 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
20 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
22 * Please see the License for the specific language governing rights and
23 * limitations under the License.
24 *
25 * @APPLE_LICENSE_HEADER_END@
26 */
27
28/*
29 * macNCOptions.h
30 * - dhcp/bootp options specific to the macNC
31 */
32
33/*
34 * Modification History:
35 *
36 * December 15, 1997	Dieter Siegmund (dieter@apple)
37 * - created
38 * November 19, 1999 	Dieter Siegmund (dieter@apple)
39 * - converted to regular C
40 */
41
42#include "gen_dhcp_tags.h"
43#include "gen_dhcp_types.h"
44#include "dhcp_options.h"
45
46enum {
47    /* macNC client request options */
48    macNCtag_client_version_e 		= 220,
49    macNCtag_client_info_e 		= 221,
50
51    /* macNC server reply options */
52    macNCtag_server_version_e 		= 230,
53    macNCtag_server_info_e 		= 231,
54    macNCtag_user_name_e		= 232,
55    macNCtag_password_e			= 233,
56    macNCtag_shared_system_file_e 	= 234,
57    macNCtag_private_system_file_e 	= 235,
58    macNCtag_page_file_e 		= 236,
59    macNCtag_MacOS_machine_name_e	= 237,
60    macNCtag_shared_system_shadow_file_e = 238,
61    macNCtag_private_system_shadow_file_e = 239,
62};
63typedef uint32_t macNCtag_t;
64
65enum {
66    macNCtype_pstring_e		= dhcptype_last_e + 1,
67    macNCtype_afp_path_e	= dhcptype_last_e + 2,
68    macNCtype_afp_password_e	= dhcptype_last_e + 3,
69};
70typedef uint32_t macNCtype_t;
71
72#import "afp.h"
73
74#define AFP_PATH_OVERHEAD	13
75#define AFP_PATH_LIMIT		242
76#define AFP_PATHTYPE_SHORT	1
77#define AFP_PATHTYPE_LONG	2
78#define AFP_PATH_SEPARATOR	'\0'
79
80/*
81 * MACNC_CLIENT_INFO
82 */
83#define MACNC_CLIENT_INFO		"Apple MacNC"
84
85boolean_t
86macNCopt_encodeAFPPath(struct in_addr iaddr, uint16_t port,
87		       const char * volname, uint32_t dirID,
88		       uint8_t pathtype, const char * pathname,
89		       char separator, void * buf,
90		       int * len_p, dhcpo_err_str_t * err);
91boolean_t
92macNCopt_str_to_type(const char * str,
93		     int type, void * buf, int * len_p,
94		     dhcpo_err_str_t * err);
95#endif /* _S_MACNC_OPTIONS_H */
96