MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ip6_pcbopt

Function ip6_pcbopt

freebsd/netinet6/ip6_output.c:2552–2568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2550}
2551
2552static int
2553ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt,
2554 struct ucred *cred, int uproto)
2555{
2556 struct ip6_pktopts *opt;
2557
2558 if (*pktopt == NULL) {
2559 *pktopt = malloc(sizeof(struct ip6_pktopts), M_IP6OPT,
2560 M_NOWAIT);
2561 if (*pktopt == NULL)
2562 return (ENOBUFS);
2563 ip6_initpktopts(*pktopt);
2564 }
2565 opt = *pktopt;
2566
2567 return (ip6_setpktopt(optname, buf, len, opt, cred, 1, 0, uproto));
2568}
2569
2570#define GET_PKTOPT_VAR(field, lenexpr) do { \
2571 if (pktopt && pktopt->field) { \

Callers 1

ip6_ctloutputFunction · 0.85

Calls 3

mallocFunction · 0.85
ip6_initpktoptsFunction · 0.85
ip6_setpktoptFunction · 0.85

Tested by

no test coverage detected