[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LWIP PATCH 4/4] patches: Add more fields to struct ifreq



Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 ...ches-Add-more-fields-to-struct-ifreq.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 patches/0005-patches-Add-more-fields-to-struct-ifreq.patch

diff --git a/patches/0005-patches-Add-more-fields-to-struct-ifreq.patch 
b/patches/0005-patches-Add-more-fields-to-struct-ifreq.patch
new file mode 100644
index 0000000..45f55a6
--- /dev/null
+++ b/patches/0005-patches-Add-more-fields-to-struct-ifreq.patch
@@ -0,0 +1,56 @@
+From 81407f65f9bca7e6561c912beeb2ca4db0a6cfbe Mon Sep 17 00:00:00 2001
+From: Costin Lupu <costin.lup@xxxxxxxxx>
+Date: Thu, 5 Dec 2019 08:43:34 +0200
+Subject: [PATCH] patches: Add more fields to struct ifreq
+
+Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
+---
+ src/include/lwip/sockets.h | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h
+index 4e333ae..cf91a9b 100644
+--- a/src/include/lwip/sockets.h
++++ b/src/include/lwip/sockets.h
+@@ -184,8 +184,38 @@ will need to increase long long */
+ #define IFNAMSIZ NETIF_NAMESIZE
+ struct ifreq {
+   char ifr_name[IFNAMSIZ]; /* Interface name */
++      union {
++              struct sockaddr ifru_addr;
++              struct sockaddr ifru_dstaddr;
++              struct sockaddr ifru_broadaddr;
++              struct sockaddr ifru_netmask;
++              struct sockaddr ifru_hwaddr;
++              short int ifru_flags;
++              int ifru_ivalue;
++              int ifru_mtu;
++              /*struct ifmap ifru_map;*/
++              char ifru_slave[IFNAMSIZ];
++              char ifru_newname[IFNAMSIZ];
++              char *ifru_data;
++      } ifr_ifru;
+ };
+ 
++#define ifr_hwaddr    ifr_ifru.ifru_hwaddr
++#define ifr_addr      ifr_ifru.ifru_addr
++#define ifr_dstaddr   ifr_ifru.ifru_dstaddr
++#define ifr_broadaddr ifr_ifru.ifru_broadaddr
++#define ifr_netmask   ifr_ifru.ifru_netmask
++#define ifr_flags     ifr_ifru.ifru_flags
++#define ifr_metric    ifr_ifru.ifru_ivalue
++#define ifr_mtu               ifr_ifru.ifru_mtu
++#define ifr_map               ifr_ifru.ifru_map
++#define ifr_slave     ifr_ifru.ifru_slave
++#define ifr_data      ifr_ifru.ifru_data
++#define ifr_ifindex   ifr_ifru.ifru_ivalue
++#define ifr_bandwidth ifr_ifru.ifru_ivalue
++#define ifr_qlen      ifr_ifru.ifru_ivalue
++#define ifr_newname   ifr_ifru.ifru_newname
++
+ /* Socket protocol types (TCP/UDP/RAW) */
+ #define SOCK_STREAM     1
+ #define SOCK_DGRAM      2
+-- 
+2.20.1
+
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.