2 * *****************************************************************
4 * * Copyright (c) Digital Equipment Corporation, 1991, 1994 *
6 * * All Rights Reserved. Unpublished rights reserved under *
7 * * the copyright laws of the United States. *
9 * * The software contained on this media is proprietary to *
10 * * and embodies the confidential technology of Digital *
11 * * Equipment Corporation. Possession, use, duplication or *
12 * * dissemination of the software and media is authorized only *
13 * * pursuant to a valid written license from Digital Equipment *
16 * * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
17 * * by the U.S. Government is subject to restrictions as set *
18 * * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
19 * * or in FAR 52.227-19, as applicable. *
21 * *****************************************************************
27 * static char *rcsid = "@(#)$RCSfile: ppp_init.c,v $ $Revision: 1.1 $ (DEC) $Date: 1995/05/22 02:30:55 $";
30 * (c) Copyright 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
38 * template for the initialization routine for a module/driver
40 * - #define STRNAME to driver/module name (with quotes)
41 * (maximum length FMNAMESZ, which is fixed at 8 + trailing 0).
43 * - #define STRCONFIG to the configure entry point's name
45 * - #define STRINFO to the driver/module's info structure name.
47 * - #define STRFLAGS to STR_IS_DEVICE or STR_IS_MODULE with others
48 * as appropriate (e.g. STR_SYSV4_OPEN).
50 * - #define STRSYNCL, STRSYNCI, STRTTYS to appropriate values if
51 * not the defaults below. See the manual.
53 * - Include this file into module's source file,
54 * preferably after the streamtab definition
56 * - The input buffer, indata, should be of the form "variable=value\n".
57 * It should always begin with "subsys=subsystem-name\n" and it should
58 * end with a '\0'. An example would be a subsystem, foo,
59 * which wants to use a specific device number. The input buffer,
60 * indata, should be "subsys=foo\ndevno=123\n\0".
62 * - If your driver should take a specific character device number,
63 * be sure to pass it within indata (e.g devno=123), else look at
64 * outdata for assigned value.
66 * - Apart from this change, you'll have to update
68 * - kernel/streams/str_config.c
69 * (insert a call to this routine)
71 * (insert module's source file)
74 #include <sys/sysconfig.h>
75 #include <sys/stream.h>
81 static struct streamadm tmpl_sa;
83 extern struct streamtab ppp_asyncinfo;
84 extern struct streamtab ppp_ifinfo;
85 extern struct streamtab ppp_compinfo;
88 ppp_configure(op, indata, indatalen, outdata, outdatalen)
103 case SYSCONFIG_CONFIGURE:
105 tmpl_sa.sa_version = OSF_STREAMS_11;
106 tmpl_sa.sa_flags = STR_IS_MODULE|STR_SYSV4_OPEN;
107 tmpl_sa.sa_ttys = NULL;
108 tmpl_sa.sa_sync_level = SQLVL_QUEUE;
109 tmpl_sa.sa_sync_info = 0;
111 strcpy(tmpl_sa.sa_name, "pppif");
113 if ((devno= strmod_add(NODEV, &ppp_ifinfo, &tmpl_sa)) == NODEV)
116 strcpy(tmpl_sa.sa_name, "pppasync");
117 if ((devno = strmod_add(NODEV, &ppp_asyncinfo, &tmpl_sa)) == NODEV)
120 strcpy(tmpl_sa.sa_name, "pppcomp");
121 if ((devno = strmod_add(NODEV, &ppp_compinfo, &tmpl_sa)) == NODEV)
126 for(x = 0; x < NPPP; x ++)
129 if (outdata && outdatalen>=0)
130 bcopy(indata,outdata,outdatalen);