| 59 | static int skippacket(struct sockbuf *sb); |
| 60 | |
| 61 | static int |
| 62 | sohasdns(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 | |
| 74 | ready: |
| 75 | return (SU_ISCONNECTED); |
| 76 | } |
| 77 | |
| 78 | #define GET8(p, val) do { \ |
| 79 | if (p->offset < p->moff) \ |
nothing calls this directly
no test coverage detected