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

Function sohasdns

freebsd/netinet/accf_dns.c:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59static int skippacket(struct sockbuf *sb);
60
61static int
62sohasdns(struct socket *so, void *arg, int waitflag)
63{
64 struct sockbuf *sb = &so->so_rcv;
65
66 /* If the socket is full, we're ready. */
67 if (sbused(sb) >= sb->sb_hiwat || sb->sb_mbcnt >= sb->sb_mbmax)
68 goto ready;
69
70 /* Check to see if we have a request. */
71 if (skippacket(sb) == DNS_WAIT)
72 return (SU_OK);
73
74ready:
75 return (SU_ISCONNECTED);
76}
77
78#define GET8(p, val) do { \
79 if (p->offset < p->moff) \

Callers

nothing calls this directly

Calls 2

skippacketFunction · 0.85
sbusedFunction · 0.50

Tested by

no test coverage detected