2 * ppp_init.c --- PPP initialization/configuration for OSF/1.
4 * Note: Checks for #ifdef CFG_OP_CONFIGURE is my cheap way of telling
5 * whether this system is V3.0+ or V2.0. Is there a better way? srt
8 #include <sys/sysconfig.h>
9 #include <sys/stream.h>
15 static int configured = 0;
16 static struct streamadm tmpl_sa = { OSF_STREAMS_11,
17 STR_IS_MODULE|STR_SYSV4_OPEN,
23 extern struct streamtab ppp_asyncinfo;
24 extern struct streamtab ppp_ifinfo;
25 extern struct streamtab ppp_compinfo;
27 #ifdef CFG_OP_CONFIGURE
28 cfg_subsys_attr_t ppp_attributes[] = {
29 {"", 0, 0, 0, 0, 0, 0}
32 typedef sysconfig_op_t cfg_op_t;
36 ppp_configure(op, indata, indata_size, outdata, outdata_size)
38 char *indata, *outdata;
39 ulong indata_size, outdata_size;
47 #ifdef CFG_OP_CONFIGURE
48 case CFG_OP_CONFIGURE:
50 case SYSCONFIG_CONFIGURE:
53 strcpy(tmpl_sa.sa_name, "pppif");
54 if ((devno=strmod_add(NODEV, &ppp_ifinfo, &tmpl_sa)) == NODEV)
57 strcpy(tmpl_sa.sa_name, "pppasync");
58 if ((devno=strmod_add(NODEV, &ppp_asyncinfo, &tmpl_sa)) == NODEV) {
59 strcpy(tmpl_sa.sa_name, "pppif");
60 strmod_del(NODEV, &ppp_ifinfo, &tmpl_sa);
64 strcpy(tmpl_sa.sa_name, "pppcomp");
65 if ((devno = strmod_add(NODEV, &ppp_compinfo, &tmpl_sa)) == NODEV) {
66 strcpy(tmpl_sa.sa_name, "pppif");
67 strmod_del(NODEV, &ppp_ifinfo, &tmpl_sa);
68 strcpy(tmpl_sa.sa_name, "pppasync");
69 strmod_del(NODEV, &ppp_asyncinfo, &tmpl_sa);