Lines Matching refs:oid

131 oid_fill(struct dn_id *oid, int len, int type, uintptr_t id)  in oid_fill()  argument
133 oid->len = len; in oid_fill()
134 oid->type = type; in oid_fill()
135 oid->subtype = 0; in oid_fill()
136 oid->id = id; in oid_fill()
238 oid_fill(&ep->oid, l, DN_CMD_GET, DN_API_VERSION); in get_extra_parms()
239 ep->oid.len = l; in get_extra_parms()
240 ep->oid.subtype = subtype; in get_extra_parms()
438 bprintf(bp, "%3u%c", (ni->oid.id) & 0xff, in list_flow()
511 prefix, qs, plr, fs->oid.id, fs->buckets, red); in print_flowset_parms()
516 fs->fs_nr, qs, plr, fs->oid.id, fs->buckets, in print_flowset_parms()
555 list_pipes(struct dn_id *oid, struct dn_id *end) in list_pipes() argument
563 for (; oid != end; oid = O_NEXT(oid, oid->len)) { in list_pipes()
564 if (oid->len < sizeof(*oid)) in list_pipes()
565 errx(1, "invalid oid len %d\n", oid->len); in list_pipes()
567 switch (oid->type) { in list_pipes()
570 printf("unrecognized object %d size %d\n", oid->type, oid->len); in list_pipes()
578 } *d = (void *)oid; in list_pipes()
579 l = (oid->len - sizeof(*oid))/sizeof(d->p[0]); in list_pipes()
590 printf("answer for cmd %d, len %d\n", oid->type, oid->id); in list_pipes()
593 struct dn_sch *s = (struct dn_sch *)oid; in list_pipes()
597 s->name, s->flags, s->buckets, s->oid.id); in list_pipes()
610 print_header(&((struct dn_flow *)oid)->fid); in list_pipes()
613 list_flow(&bp, (struct dn_flow *)oid); in list_pipes()
619 struct dn_link *p = (struct dn_link *)oid; in list_pipes()
647 print_flowset_parms((struct dn_fs *)oid, buf); in list_pipes()
651 print_extra_delay_parms((struct dn_profile *)oid); in list_pipes()
666 struct dn_id oid; in ipfw_delete_pipe() member
670 cmd.oid.subtype = (do_pipe == 1) ? DN_LINK : in ipfw_delete_pipe()
673 i = do_cmd(IP_DUMMYNET3, &cmd, cmd.oid.len); in ipfw_delete_pipe()
1334 sch_extra ->oid.subtype = 0; /* don't configure scheduler */ in ipfw_config_pipe()
1340 aqm_extra ->oid.subtype = 0; /* don't configure AQM */ in ipfw_config_pipe()
1345 sch->oid.subtype = 0; /* defaults to WF2Q+ */ in ipfw_config_pipe()
1361 aqm_extra ->oid.subtype = 0; in ipfw_config_pipe()
1373 sch_extra ->oid.subtype = 0; in ipfw_config_pipe()
1378 aqm_extra ->oid.subtype = 0; in ipfw_config_pipe()
1576 aqm_extra->oid.subtype = DN_AQM_PARAMS; in ipfw_config_pipe()
1589 sch_extra->oid.subtype = DN_SCH_PARAMS; in ipfw_config_pipe()
1658 sch->oid.subtype = 0; /* use string */ in ipfw_config_pipe()
1666 sch_extra->oid.subtype = DN_SCH_PARAMS; in ipfw_config_pipe()
1851 struct dn_id oid; in dummynet_flush() local
1852 oid_fill(&oid, sizeof(oid), DN_CMD_FLUSH, DN_API_VERSION); in dummynet_flush()
1853 do_cmd(IP_DUMMYNET3, &oid, oid.len); in dummynet_flush()
1917 struct dn_id *oid, *x = NULL; in dummynet_list() local
1930 l = sizeof(*oid) + sizeof(uint32_t) * n * 2; in dummynet_list()
1931 oid = safe_calloc(1, l); in dummynet_list()
1932 oid_fill(oid, l, DN_CMD_GET, DN_API_VERSION); in dummynet_list()
1935 parse_range(ac, av, (uint32_t *)(oid + 1), n*2); in dummynet_list()
1952 oid->subtype = DN_LINK; /* list pipe */ in dummynet_list()
1955 oid->subtype = DN_FS; /* list queue */ in dummynet_list()
1958 oid->subtype = DN_SCH; /* list sched */ in dummynet_list()
1972 ret = do_cmd(-IP_DUMMYNET3, oid, (uintptr_t)&l); in dummynet_list()
1973 if (ret != 0 || oid->id <= sizeof(*oid)) in dummynet_list()
1975 buflen = oid->id + max_size; in dummynet_list()
1976 oid->len = sizeof(*oid); /* restore */ in dummynet_list()
1982 bcopy(oid, x, oid->len); in dummynet_list()
1984 if (ret != 0 || x->id <= sizeof(*oid)) in dummynet_list()
1994 free(oid); in dummynet_list()