search for: ifreq

Displaying 20 results from an estimated 130 matches for "ifreq".

2005 Apr 20
1
negative p-values from fisher's test (PR#7801)
Full_Name: Martha Nason Version: 2.0.1 OS: Windows XP Submission from: (NULL) (137.187.154.154) I am running simulations using fisher's test on 2 x c tables and a very small p.value from fisher's test (<2.2e-16) is returned as a negative number. Code follows. > set.seed(0) > nreps.outer <-7 > pvalue.fisher <- rep(NA,nreps.outer) > > population1 <- c(
2007 Apr 18
0
[Bridge] [PATCH] (9/11) bridge -- new ioctl interface for 32/64 compatiablity
.../ + /* Device private ioctl calls */ /* diff -Nru a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c --- a/net/bridge/br_ioctl.c 2004-05-20 14:46:10 -07:00 +++ b/net/bridge/br_ioctl.c 2004-05-20 14:46:10 -07:00 @@ -78,13 +78,36 @@ return num; } -int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +static int add_del_if(struct net_bridge *br, int ifindex, int isadd) +{ + struct net_device *dev; + int ret; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + dev = dev_get_by_index(ifindex); + if (dev == NULL) + return -EINVAL; + + if (isadd) + ret = br_add_if(br, dev); + el...
2009 Jun 08
1
problem compiling ctdb
...mux.c In file included from /usr/include/linux/netfilter_ipv4/ip_queue.h:10, from /usr/include/libipq.h:37, from utils/ipmux/ipmux.c:31: /usr/include/linux/if.h:59: error: redefinition of `struct ifmap' /usr/include/linux/if.h:77: error: redefinition of `struct ifreq' /usr/include/linux/if.h:126: error: redefinition of `struct ifconf' make: *** [utils/ipmux/ipmux.o] Error 1 After some investigation, I found out that there two conflicting includes: 1. utils/ipmux/ipmux.c -> ./include/includes.h -> ./lib/replace/system/network.h->/usr/include/...
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
...dge/br_device.c b/net/bridge/br_device.c --- a/net/bridge/br_device.c 2004-05-20 10:51:05 -07:00 +++ b/net/bridge/br_device.c 2004-05-20 10:51:05 -07:00 @@ -19,21 +19,6 @@ #include <asm/uaccess.h> #include "br_private.h" -static int br_dev_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - unsigned long args[4]; - unsigned long *data; - - if (cmd != SIOCDEVPRIVATE) - return -EOPNOTSUPP; - - data = (unsigned long *)rq->ifr_data; - if (copy_from_user(args, data, 4*sizeof(unsigned long))) - return -EFAULT; - - return br_ioctl_device(dev->priv, args[0], args[1]...
2008 Aug 13
1
[PATCH 1/1] tun: TUNGETIFF interface to query name and flags
...include/linux/if_tun.h | 1 + 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e6bbc63..95931a5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -748,6 +748,36 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) return err; } +static int tun_get_iff(struct net *net, struct file *file, struct ifreq *ifr) +{ + struct tun_struct *tun = file->private_data; + + if (!tun) + return -EBADFD; + + DBG(KERN_INFO "%s: tun_get_iff\n", tun->dev->name); + + strcpy(ifr->ifr_name, tun->...
2008 Aug 13
1
[PATCH 1/1] tun: TUNGETIFF interface to query name and flags
...include/linux/if_tun.h | 1 + 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e6bbc63..95931a5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -748,6 +748,36 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) return err; } +static int tun_get_iff(struct net *net, struct file *file, struct ifreq *ifr) +{ + struct tun_struct *tun = file->private_data; + + if (!tun) + return -EBADFD; + + DBG(KERN_INFO "%s: tun_get_iff\n", tun->dev->name); + + strcpy(ifr->ifr_name, tun->...
2010 Apr 26
1
valgrind ipconfig work
...cket_send(). Signed-off-by: maximilian attems <max at stro.at> diff --git a/usr/kinit/ipconfig/netdev.c b/usr/kinit/ipconfig/netdev.c index 6e3014f..e203d0c 100644 --- a/usr/kinit/ipconfig/netdev.c +++ b/usr/kinit/ipconfig/netdev.c @@ -43,6 +43,7 @@ static int netdev_sif_addr(struct ifreq *ifr, int cmd, uint32_t addr) { struct sockaddr_in sin; + memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = addr; diff --git a/usr/kinit/ipconfig/packet.c b/usr/kinit/ipconfig/packet.c index 508c7ba..4df5431 100644 --- a/usr/kinit/ipconfig/packet.c +++ b/u...
2023 Aug 19
1
[Bridge] [PATCH] net: bridge: Fix refcnt issues in dev_ioctl
..._bridge *br, unsigned int cmd, break; } - rtnl_unlock(); - return ret; } diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 3730945ee294..17df956df8cb 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -336,7 +336,6 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, void __user *data, int err; struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); const struct net_device_ops *ops; - netdevice_tracker dev_tracker; if (!dev) return -ENODEV; @@ -405,12 +404,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, void __user *...
2017 Oct 10
3
tunnel device name acquisition?
Numerous how-tos all over the Internet show how one would set up a tunnel using ssh, e.g.: ssh -f -o Tunnel=ethernet <server_ip> true I was wondering if there's a way to subsequently acquire the names of the local and remote tun/tap interfaces (e.g., using the default "-w any:any") for subsequent automatic tunnel configuration, e.g.: ip link set $TapDev up ip link set
2023 Jun 10
2
[Bridge] [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (8)
Hello, syzbot found the following issue on: HEAD commit: 67faabbde36b selftests/bpf: Add missing prototypes for sev.. git tree: bpf-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=1381363b280000 kernel config: https://syzkaller.appspot.com/x/.config?x=5335204dcdecfda dashboard link: https://syzkaller.appspot.com/bug?extid=881d65229ca4f9ae8c84 compiler: gcc (Debian
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...net_tap_init(VLANState *vlan, const char *model, #endif /* !_WIN32 */ +typedef struct RAWState { + VLANClientState *vc; + int fd; + uint8_t buf[4096]; + int promisc; +} RAWState; + +static int net_raw_fd_init(Monitor *mon, const char *ifname, int promisc) +{ + int fd, ret; + struct ifreq req; + struct sockaddr_ll lladdr; + + fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (fd < 0) + fprintf(stderr, "packet socket failed\n"); + + memset(&req, 0, sizeof(req)); + strncpy(req.ifr_name, ifname, IFNAMSIZ-1); + ret = ioctl(fd, SIOCGIFINDEX, &req); + if (ret...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...net_tap_init(VLANState *vlan, const char *model, #endif /* !_WIN32 */ +typedef struct RAWState { + VLANClientState *vc; + int fd; + uint8_t buf[4096]; + int promisc; +} RAWState; + +static int net_raw_fd_init(Monitor *mon, const char *ifname, int promisc) +{ + int fd, ret; + struct ifreq req; + struct sockaddr_ll lladdr; + + fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (fd < 0) + fprintf(stderr, "packet socket failed\n"); + + memset(&req, 0, sizeof(req)); + strncpy(req.ifr_name, ifname, IFNAMSIZ-1); + ret = ioctl(fd, SIOCGIFINDEX, &req); + if (ret...
2006 Aug 25
2
RFC: non-root ssh tun access
...} +#if defined(SSH_TUN_LINUX) int -tun_open(int tun, int mode) +tun_open(int tun, int mode, uid_t uid) { -#if defined(CUSTOM_SYS_TUN_OPEN) - return (sys_tun_open(tun, mode)); + return (sys_tun_open(tun, mode, uid)); #elif defined(SSH_TUN_OPENBSD) +int +tun_open(int tun, int mode) +{ struct ifreq ifr; char name[100]; int fd = -1, sock; diff -Nurd openssh-4.3p2.orig/misc.h openssh-4.3p2/misc.h --- openssh-4.3p2.orig/misc.h 2006-01-31 05:49:28.000000000 -0500 +++ openssh-4.3p2/misc.h 2006-08-25 09:01:57.000000000 -0400 @@ -55,7 +55,11 @@ int ask_permission(const char *, ...) __attribute...
2004 May 28
1
ipconfig related question (do not get static IP setting)
Hi!! I found your ipconfig stuff in the udev rpm in SuSE 9.1. I'm about to setup a initramfs (pretty cool - much better than initrd) to boot linux diskless clients over the net. All the tools I would need, seem to be there with ipconfig/nfsmount ... I like to use the information I get from PXE/syslinux or Etherboot writing something like:
2019 Nov 24
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...t txqueue) { } diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 82f9a6a814ae..bd07fa968266 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -4169,7 +4169,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) * * dev pointer to network device structure */ -static void hdlcdev_tx_timeout(struct net_device *dev) +static void hdlcdev_tx_timeout(struct net_device *dev, int txqueue) { MGSLPC_INFO *info = dev_to_port(dev); unsigned long flags; diff --git a/drivers/infiniband/ulp/ipo...
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Hi Michael, Em sex., 22 de nov. de 2019 ?s 07:31, Michael S. Tsirkin <mst at redhat.com> escreveu: > > On Thu, Nov 21, 2019 at 10:36:36PM -0300, Julio Faracco wrote: > > Driver virtio_net is not handling error events for TX provided by > > dev_watchdog. This event is reached when transmission queue is having > > problems to transmit packets. This could happen for any
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Hi Michael, Em sex., 22 de nov. de 2019 ?s 07:31, Michael S. Tsirkin <mst at redhat.com> escreveu: > > On Thu, Nov 21, 2019 at 10:36:36PM -0300, Julio Faracco wrote: > > Driver virtio_net is not handling error events for TX provided by > > dev_watchdog. This event is reached when transmission queue is having > > problems to transmit packets. This could happen for any
2007 Apr 18
0
[Bridge] BCP code ported to pppd 2.4.2
...nux.c Tue Jan 13 05:05:20 2004 +++ ppp-2.4.2-bcp/pppd/sys-linux.c Thu Apr 7 00:02:12 2005 @@ -1840,6 +1840,30 @@ } /* + * set_if_hwaddr - set the hardware address for the specified + * network interface device. + */ +int +set_if_hwaddr(const u_char *addr, const char *name) +{ + struct ifreq ifreq; + int ret, sock_fd; + + sock_fd = socket(AF_INET, SOCK_DGRAM, 0); + if (sock_fd < 0) + return 0; + memset(&ifreq.ifr_hwaddr, 0, sizeof(struct sockaddr)); + strlcpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name)); + ret = ioctl(sock_fd, SIOCGIFHWADDR, &ifreq)...
2011 Aug 12
11
[net-next RFC PATCH 0/7] multiqueue support for tun/tap
As multi-queue nics were commonly used for high-end servers, current single queue based tap can not satisfy the requirement of scaling guest network performance as the numbers of vcpus increase. So the following series implements multiple queue support in tun/tap. In order to take advantages of this, a multi-queue capable driver and qemu were also needed. I just rebase the latest version of
2011 Aug 12
11
[net-next RFC PATCH 0/7] multiqueue support for tun/tap
As multi-queue nics were commonly used for high-end servers, current single queue based tap can not satisfy the requirement of scaling guest network performance as the numbers of vcpus increase. So the following series implements multiple queue support in tun/tap. In order to take advantages of this, a multi-queue capable driver and qemu were also needed. I just rebase the latest version of