* Copied directly from uipc_socket2.c. We leave out some fields that are in * nested structures that aren't used to avoid extra work. */
| 143 | * nested structures that aren't used to avoid extra work. |
| 144 | */ |
| 145 | static void |
| 146 | sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb) |
| 147 | { |
| 148 | xsb->sb_cc = sb->sb_ccc; |
| 149 | xsb->sb_hiwat = sb->sb_hiwat; |
| 150 | xsb->sb_mbcnt = sb->sb_mbcnt; |
| 151 | xsb->sb_mcnt = sb->sb_mcnt; |
| 152 | xsb->sb_ccnt = sb->sb_ccnt; |
| 153 | xsb->sb_mbmax = sb->sb_mbmax; |
| 154 | xsb->sb_lowat = sb->sb_lowat; |
| 155 | xsb->sb_flags = sb->sb_flags; |
| 156 | xsb->sb_timeo = sb->sb_timeo; |
| 157 | } |
| 158 | |
| 159 | int |
| 160 | sotoxsocket(struct socket *so, struct xsocket *xso) |