Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/darwin support #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
build
dist
MANIFEST
.idea
.vscode
cmake-build-debug
CMakeLists.txt
*.egg-info
*.bak
*.pyc
*.o
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Linux TUN/TAP wrapper for Python
Linux & Darwin TUN/TAP wrapper for Python
================================

``pytun`` is a Python module which let you create TUN/TAP device very easily.
Expand Down
17 changes: 17 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef PYTUN_COMMON_H
#define PYTUN_COMMON_H

#include <object.h>

#ifndef IFNAMSIZ
#define IFNAMSIZ (20)
#endif // IFNAMSIZ

struct pytun_tuntap {
PyObject_HEAD
int fd;
char name[IFNAMSIZ];
};
typedef struct pytun_tuntap pytun_tuntap_t;

#endif //PYTUN_COMMON_H
Loading