[ovs-dev] [PATCH v2 2/3] windows/net: Definition for IFNAMSIZ.

Gurucharan Shetty shettyg at nicira.com
Thu Mar 13 21:03:09 UTC 2014


Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 include/windows/net/if.h |   24 ++++++++++++++++++++++++
 lib/netdev-vport.h       |    4 ++++
 2 files changed, 28 insertions(+)

diff --git a/include/windows/net/if.h b/include/windows/net/if.h
index e69de29..893ffe4 100644
--- a/include/windows/net/if.h
+++ b/include/windows/net/if.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 Nicira, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __NET_IF_H
+#define __NET_IF_H 1
+
+#include <Netioapi.h>
+
+#define IFNAMSIZ IF_NAMESIZE
+
+#endif /* net/if.h */
diff --git a/lib/netdev-vport.h b/lib/netdev-vport.h
index eaeb386..833fee8 100644
--- a/lib/netdev-vport.h
+++ b/lib/netdev-vport.h
@@ -41,7 +41,11 @@ void netdev_vport_inc_tx(const struct netdev *,
 
 const char *netdev_vport_class_get_dpif_port(const struct netdev_class *);
 
+#ifndef _WIN32
 enum { NETDEV_VPORT_NAME_BUFSIZE = 16 };
+#else
+enum { NETDEV_VPORT_NAME_BUFSIZE = 256 };
+#endif
 const char *netdev_vport_get_dpif_port(const struct netdev *,
                                        char namebuf[], size_t bufsize);
 char *netdev_vport_get_dpif_port_strdup(const struct netdev *);
-- 
1.7.9.5




More information about the dev mailing list