+#ifdef sun
+ if (us->kstats == 0) {
+ char unit[32];
+
+ sprintf(unit, "ppp%d", us->ppa->ppa_id);
+ us->kstats = kstat_create("ppp", us->ppa->ppa_id, unit,
+ "net", KSTAT_TYPE_NAMED, 4, 0);
+ if (us->kstats != 0) {
+ kstat_named_t *kn = KSTAT_NAMED_PTR(us->kstats);
+
+ strcpy(kn[0].name, "ipackets");
+ kn[0].data_type = KSTAT_DATA_ULONG;
+ strcpy(kn[1].name, "ierrors");
+ kn[1].data_type = KSTAT_DATA_ULONG;
+ strcpy(kn[2].name, "opackets");
+ kn[2].data_type = KSTAT_DATA_ULONG;
+ strcpy(kn[3].name, "oerrors");
+ kn[3].data_type = KSTAT_DATA_ULONG;
+ kstat_install(us->kstats);
+ }
+ }
+#endif
+