Permalink
Browse files

Move common ifconfig flags to the header file

  • Loading branch information...
1 parent 4f63d0f commit d6af18553d058888a75441fcc82576c85150aabd Michael Santos committed with Jun 18, 2011
Showing with 4 additions and 6 deletions.
  1. +4 −0 include/tuntap.hrl
  2. +0 −3 src/tunctl_darwin.erl
  3. +0 −3 src/tunctl_linux.erl
View
@@ -33,6 +33,10 @@
-define(SIZEOF_UNSIGNED_INT, ?SIZEOF_INT).
-define(UINT16, 2/native-unsigned-integer-unit:8).
+% ifconfig
+-define(IFF_RUNNING, 16#40).
+-define(IFF_UP, 16#01).
+
% Ioctl defines
-define(TUNSETNOCSUM, ?IOW($T, 200, ?SIZEOF_INT)).
-define(TUNSETDEBUG, ?IOW($T, 201, ?SIZEOF_INT)).
View
@@ -47,9 +47,6 @@
-define(SIZEOF_STRUCT_IFALIASREQ, 64).
-define(SIOCAIFADDR, ?IOW($i, 26, ?SIZEOF_STRUCT_IFALIASREQ)).
--define(IFF_RUNNING, 16#40).
--define(IFF_UP, 16#01).
-
%%--------------------------------------------------------------------
%%% Exports
View
@@ -46,9 +46,6 @@
-define(SIOCSIFFLAGS, 16#8914).
-define(SIOCSIFADDR, 16#8916).
--define(IFF_RUNNING, 16#40).
--define(IFF_UP, 16#01).
-
-define(TUNDEV, "net/tun").
%%--------------------------------------------------------------------

0 comments on commit d6af185

Please sign in to comment.