Displaying 2 results from an estimated 2 matches for "net_raw_init".
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...-1 && (errno == EINTR || errno == EAGAIN));
+
+ return len;
+}
+
+static ssize_t raw_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
+{
+ struct iovec iov[1];
+
+ iov[0].iov_base = (char *)buf;
+ iov[0].iov_len = size;
+
+ return raw_receive_iov(vc, iov, 1);
+}
+
+static int net_raw_init(Monitor *mon, VLANState *vlan, const char *model,
+ const char *name, const char *ifname,
+ int promisc, int fd)
+{
+ RAWState *s;
+
+ s = qemu_mallocz(sizeof(RAWState));
+
+ if (fd == -1) {
+ s->fd = net_raw_fd_init(mon, ifname, promisc);
+ s->promisc = promisc;
+ } else
+ s->fd =...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...-1 && (errno == EINTR || errno == EAGAIN));
+
+ return len;
+}
+
+static ssize_t raw_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
+{
+ struct iovec iov[1];
+
+ iov[0].iov_base = (char *)buf;
+ iov[0].iov_len = size;
+
+ return raw_receive_iov(vc, iov, 1);
+}
+
+static int net_raw_init(Monitor *mon, VLANState *vlan, const char *model,
+ const char *name, const char *ifname,
+ int promisc, int fd)
+{
+ RAWState *s;
+
+ s = qemu_mallocz(sizeof(RAWState));
+
+ if (fd == -1) {
+ s->fd = net_raw_fd_init(mon, ifname, promisc);
+ s->promisc = promisc;
+ } else
+ s->fd =...