Displaying 2 results from an estimated 2 matches for "raw_receive_iov".
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...s->fd, s->buf, sizeof(s->buf), MSG_TRUNC);
+ if (size <= 0)
+ break;
+
+ size = qemu_send_packet_async(s->vc, s->buf, size,
+ raw_send_completed);
+ if (size == 0)
+ qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
+
+ } while (size > 0);
+}
+
+static ssize_t raw_receive_iov(VLANClientState *vc, const struct iovec *iov,
+ int iovcnt)
+{
+ ssize_t len;
+ RAWState *s = vc->opaque;
+
+ do {
+ len = writev(s->fd, iov, iovcnt);
+ } while (len == -1 && (errno == EINTR || errno == EAGAIN));
+
+ return len;
+}
+
+static ssize_t raw_receive(VLANClientState *vc...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...s->fd, s->buf, sizeof(s->buf), MSG_TRUNC);
+ if (size <= 0)
+ break;
+
+ size = qemu_send_packet_async(s->vc, s->buf, size,
+ raw_send_completed);
+ if (size == 0)
+ qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
+
+ } while (size > 0);
+}
+
+static ssize_t raw_receive_iov(VLANClientState *vc, const struct iovec *iov,
+ int iovcnt)
+{
+ ssize_t len;
+ RAWState *s = vc->opaque;
+
+ do {
+ len = writev(s->fd, iov, iovcnt);
+ } while (len == -1 && (errno == EINTR || errno == EAGAIN));
+
+ return len;
+}
+
+static ssize_t raw_receive(VLANClientState *vc...