Lines Matching defs:opt
918 push_option(struct nmreq_option *opt, struct TestContext *ctx)
920 opt->nro_next = (uintptr_t)ctx->nr_opt;
921 ctx->nr_opt = opt;
931 checkoption(struct nmreq_option *opt, struct nmreq_option *exp)
933 if (opt->nro_next != exp->nro_next) {
935 (void *)(uintptr_t)opt->nro_next,
939 if (opt->nro_reqtype != exp->nro_reqtype) {
940 printf("nro_reqtype %u expected %u\n", opt->nro_reqtype,
944 if (opt->nro_status != exp->nro_status) {
945 printf("nro_status %u expected %u\n", opt->nro_status,
955 struct nmreq_option opt, save;
959 memset(&opt, 0, sizeof(opt));
960 opt.nro_reqtype = 1234;
961 push_option(&opt, ctx);
962 save = opt;
969 return checkoption(&opt, &save);
975 struct nmreq_option opt;
979 opt.nro_reqtype = 1234;
980 push_option(&opt, ctx);
981 opt.nro_next = (uintptr_t)&opt;
1202 push_csb_option(struct TestContext *ctx, struct nmreq_opt_csb *opt)
1229 memset(opt, 0, sizeof(*opt));
1230 opt->nro_opt.nro_reqtype = NETMAP_REQ_OPT_CSB;
1231 opt->csb_atok = (uintptr_t)ctx->csb;
1232 opt->csb_ktoa = (uintptr_t)(((uint8_t *)ctx->csb) +
1236 push_option(&opt->nro_opt, ctx);
1244 struct nmreq_opt_csb opt;
1247 ret = push_csb_option(ctx, &opt);
1261 struct nmreq_opt_csb opt;
1264 memset(&opt, 0, sizeof(opt));
1265 opt.nro_opt.nro_reqtype = NETMAP_REQ_OPT_CSB;
1266 opt.csb_atok = (uintptr_t)0x10;
1267 opt.csb_ktoa = (uintptr_t)0x800;
1268 push_option(&opt.nro_opt, ctx);
1439 struct nmreq_opt_csb opt;
1442 ret = push_csb_option(ctx, &opt);
1496 struct nmreq_opt_csb opt;
1500 ret = push_csb_option(ctx, &opt);
1504 saveopt = opt.nro_opt;
1520 ret = checkoption(&opt.nro_opt, &saveopt);
1548 struct nmreq_opt_csb opt;
1556 ret = push_csb_option(ctx, &opt);
1627 struct nmreq_opt_csb opt;
1630 ret = push_csb_option(ctx, &opt);
1866 int opt;
1888 while ((opt = getopt(argc, argv, "hi:j:l")) != -1) {
1889 switch (opt) {
1912 printf(" Unrecognized option %c\n", opt);