1 2#ifndef _S_MACNC_H 3#define _S_MACNC_H 4 5/* 6 * Copyright (c) 1999-2008 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 * macNC.h 29 * - definitions for Rhapsody Mac NC Boot Server 30 */ 31 32/* 33 * Modification History: 34 * 35 * December 2, 1997 Dieter Siegmund (dieter@apple) 36 * - created 37 */ 38 39#include <mach/boolean.h> 40 41/** 42 ** Defines: 43 **/ 44 45#include "afp.h" 46#include "nbimages.h" 47 48#define SHARED_DIR_PERMS 0775 49#define SHARED_FILE_PERMS 0664 50 51#define CLIENT_DIR_PERMS 0770 52#define CLIENT_FILE_PERMS 0660 53 54/** 55 ** Types: 56 **/ 57typedef int (*funcptr_t)(void * arg); 58 59/* 60 * MACNC_SERVER_VERSION 61 * - the value we pass back to the client in the BOOTP reply 62 */ 63#define MACNC_SERVER_VERSION 0 64 65#define kNetBootShadowName "Shadow" 66 67 68/** 69 ** Prototypes: 70 **/ 71boolean_t macNC_init(); 72boolean_t macNC_allocate(NBImageEntryRef image_entry, 73 struct dhcp * reply, const char * hostname, 74 struct in_addr servip, 75 int host_number, dhcpoa_t * options, 76 uid_t uid, const char * afp_user, 77 const char * passwd); 78 79NBSPEntry * 80macNC_allocate_shadow(const char * machine_name, int host_number, 81 uid_t uid, gid_t gid, const char * shadow_name); 82 83boolean_t macNC_get_client_info(struct dhcp * pkt, int pkt_size, 84 dhcpol_t * options, 85 u_int * client_version); 86void 87macNC_unlink_shadow(int host_number, const char * hostname); 88 89boolean_t 90set_privs(const char * path, struct stat * sb_p, uid_t uid, gid_t gid, 91 mode_t mode, boolean_t unlock); 92 93 94#endif /* _S_MACNC_H */ 95