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}
34 ppp_configure(op, indata, indata_size, outdata, outdata_size)
36 char *indata, *outdata;
37 ulong indata_size, outdata_size;
45 #ifdef CFG_OP_CONFIGURE
46 case CFG_OP_CONFIGURE:
48 case SYSCONFIG_CONFIGURE:
51 strcpy(tmpl_sa.sa_name, "pppif");
52 if ((devno=strmod_add(NODEV, &ppp_ifinfo, &tmpl_sa)) == NODEV)
55 strcpy(tmpl_sa.sa_name, "pppasync");
56 if ((devno=strmod_add(NODEV, &ppp_asyncinfo, &tmpl_sa)) == NODEV) {
57 strcpy(tmpl_sa.sa_name, "pppif");
58 strmod_del(NODEV, &ppp_ifinfo, &tmpl_sa);
62 strcpy(tmpl_sa.sa_name, "pppcomp");
63 if ((devno = strmod_add(NODEV, &ppp_compinfo, &tmpl_sa)) == NODEV) {
64 strcpy(tmpl_sa.sa_name, "pppif");
65 strmod_del(NODEV, &ppp_ifinfo, &tmpl_sa);
66 strcpy(tmpl_sa.sa_name, "pppasync");
67 strmod_del(NODEV, &ppp_asyncinfo, &tmpl_sa);