2 * Copyright (c) 1999, Boris Popov
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Boris Popov.
16 * 4. Neither the name of the author nor the names of any co-contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * $FreeBSD: src/sys/netncp/ncp_user.h,v 1.2 1999/12/12 05:50:06 bp Exp $
33 * $DragonFly: src/sys/netproto/ncp/ncp_user.h,v 1.3 2005/02/28 16:23:00 joerg Exp $
35 #ifndef _NETNCP_NCP_USER_H_
36 #define _NETNCP_NCP_USER_H_
39 * "ncp" interface to kernel, this can be done via syscalls but may eat
40 * a lot of them, so we select internal code, define req's and replays
41 * as necessary. Structure for call is simple:
46 #define NCP_CONN 0xF5 /* change if that will occupied */
47 #define NCP_CONN_READ 0x01 /* read from file handle */
48 #define NCP_CONN_WRITE 0x02 /* write to file handle */
49 #define NCP_CONN_SETFLAGS 0x03 /* word mask, word flags */
50 #define NCP_CONN_LOGIN 0x04 /* bind login on handle */
51 #define NCP_CONN_GETINFO 0x05 /* get information about connection */
52 #define NCP_CONN_GETUSER 0x06 /* get user name for connection */
53 #define NCP_CONN_CONN2REF 0x07 /* convert handle to reference */
54 #define NCP_CONN_CONNCLOSE 0x08 /* release connection handle */
55 #define NCP_CONN_FRAG 0x09 /* ncp fragmented request */
56 #define NCP_CONN_DUP 0x0A /* get an additional handle */
57 #define NCP_CONN_GETDATA 0x0B /* retrieve NCP_CD_* vals */
58 #define NCP_CONN_SETDATA 0x0C /* store NCP_CD_* vals */
61 * Internal connection data can be set by owner or superuser and retrieved
64 #define NCP_CD_NDSLOGINKEY 0x01
65 #define NCP_CD_NDSPRIVATEKEY 0x02
66 #define NCP_CD_NDSUFLAGS 0x03
68 /* user side structures to issue fragmented ncp calls */
82 struct ncp_conn_login
{
88 struct ncp_conn_frag
{
89 int cc
; /* completion code */
90 int cs
; /* connection state */