Home
last modified time | relevance | path

Searched refs:nmctx (Results 1 – 7 of 7) sorted by relevance

/freebsd/lib/libnetmap/
H A Dlibnetmap.h42 struct nmctx;
189 struct nmctx *ctx;
504 struct nmctx *ctx);
526 struct nmctx *ctx);
546 void *token, struct nmctx *ctx);
583 struct nmctx *ctx; /* the nmctx for errors and malloc/free */
604 int32_t nmreq_get_mem_id(const char **portname, struct nmctx *ctx);
638 typedef void (*nmctx_error_cb)(struct nmctx *, const char *);
639 typedef void *(*nmctx_malloc_cb)(struct nmctx *,size_t);
640 typedef void (*nmctx_free_cb)(struct nmctx *,void *);
[all …]
H A Dnmctx.c46 nmctx_default_error(struct nmctx *ctx, const char *errmsg) in nmctx_default_error()
53 nmctx_default_malloc(struct nmctx *ctx, size_t sz) in nmctx_default_malloc()
60 nmctx_default_free(struct nmctx *ctx, void *p) in nmctx_default_free()
66 static struct nmctx nmctx_global = {
74 static struct nmctx *nmctx_default = &nmctx_global;
76 struct nmctx *
82 struct nmctx *
83 nmctx_set_default(struct nmctx *ctx) in nmctx_set_default()
85 struct nmctx *old = nmctx_default; in nmctx_set_default()
92 nmctx_ferror(struct nmctx *ctx, const char *fmt, ...) in nmctx_ferror()
[all …]
H A Dnmctx-pthreads.c46 struct nmctx up;
53 nmctx_pthread_lock(struct nmctx *ctx, int lock) in nmctx_pthread_lock()
67 struct nmctx *old; in nmctx_set_threadsafe()
H A DMakefile8 SRCS= nmctx.c nmport.c \
9 nmctx-pthreads.c nmreq.c
H A Dnmport.c77 nmport_new_with_ctx(struct nmctx *ctx) in nmport_new_with_ctx()
101 struct nmctx *ctx = nmctx_get(); in nmport_new()
129 struct nmctx *ctx = d->ctx; in nmport_extmem()
189 struct nmctx *ctx = d->ctx; in nmport_extmem_from_file()
269 struct nmctx *ctx = d->ctx; in nmport_offset()
390 struct nmctx *ctx = p->ctx; in NPOPT_DECL()
601 struct nmctx *ctx = d->ctx; in nmport_register()
658 struct nmctx *ctx = d->ctx; in nmport_mmap()
745 struct nmctx *ctx = d->ctx; in nmport_undo_mmap()
834 struct nmctx *ctx; in nmport_clone()
H A Dnmreq.c104 nmreq_header_decode(const char **pifname, struct nmreq_header *h, struct nmctx *ctx) in nmreq_header_decode()
201 nmreq_get_mem_id(const char **pifname, struct nmctx *ctx) in nmreq_get_mem_id()
243 nmreq_register_decode(const char **pifname, struct nmreq_register *r, struct nmctx *ctx) in nmreq_register_decode()
482 void *token, struct nmctx *ctx) in nmreq_option_decode1()
552 void *token, struct nmctx *ctx) in nmreq_options_decode()
/freebsd/tests/sys/netmap/
H A Dctrl-api-test.c172 struct nmctx *nmctx; member
1858 if (nmreq_header_decode(&ctx->ifparse, hdr, ctx->nmctx) < 0) { in nmreq_hdr_parsing()
1908 if (nmreq_register_decode(&ctx->ifparse, reg, ctx->nmctx) < 0) { in nmreq_reg_parsing()
1960 nmctx_parsing_error(struct nmctx *ctx, const char *msg) in nmctx_parsing_error()
1972 struct nmctx test_nmctx, *nmctx; in nmreq_parsing() local
1975 nmctx = nmctx_get(); in nmreq_parsing()
1976 if (nmctx == NULL) { in nmreq_parsing()
1980 test_nmctx = *nmctx; in nmreq_parsing()
1982 ctx->nmctx = &test_nmctx; in nmreq_parsing()
2001 ctx->nmctx = NULL; in nmreq_parsing()