• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * DO NOT EDIT THIS FILE. It was generated from sys/ioctl.h.
3  *
4  * Copyright (c) 2013 The Chromium Authors. All rights reserved.
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 
9 /* Copyright (C) 1996-2014 Free Software Foundation, Inc.
10    This file is part of the GNU C Library.
11 
12    The GNU C Library is free software; you can redistribute it and/or
13    modify it under the terms of the GNU Lesser General Public
14    License as published by the Free Software Foundation; either
15    version 2.1 of the License, or (at your option) any later version.
16 
17    The GNU C Library is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20    Lesser General Public License for more details.
21 
22    You should have received a copy of the GNU Lesser General Public
23    License along with the GNU C Library; if not, see
24    <http://www.gnu.org/licenses/>.  */
25 
26 #include <Python.h>
27 #include <sys/ioctl.h>
28 
_init_sys_ioctl_h(PyObject * m)29 void _init_sys_ioctl_h(PyObject *m) {
30   /* Use the definitions from the kernel header files.  */
31 
32   /* Routing table calls.  */
33   PyModule_AddIntMacro(m, SIOCADDRT);
34   PyModule_AddIntMacro(m, SIOCDELRT);
35   PyModule_AddIntMacro(m, SIOCRTMSG);
36 
37   /* Socket configuration controls. */
38   PyModule_AddIntMacro(m, SIOCGIFNAME);
39   PyModule_AddIntMacro(m, SIOCSIFLINK);
40   PyModule_AddIntMacro(m, SIOCGIFCONF);
41   PyModule_AddIntMacro(m, SIOCGIFFLAGS);
42   PyModule_AddIntMacro(m, SIOCSIFFLAGS);
43   PyModule_AddIntMacro(m, SIOCGIFADDR);
44   PyModule_AddIntMacro(m, SIOCSIFADDR);
45   PyModule_AddIntMacro(m, SIOCGIFDSTADDR);
46   PyModule_AddIntMacro(m, SIOCSIFDSTADDR);
47   PyModule_AddIntMacro(m, SIOCGIFBRDADDR);
48   PyModule_AddIntMacro(m, SIOCSIFBRDADDR);
49   PyModule_AddIntMacro(m, SIOCGIFNETMASK);
50   PyModule_AddIntMacro(m, SIOCSIFNETMASK);
51   PyModule_AddIntMacro(m, SIOCGIFMETRIC);
52   PyModule_AddIntMacro(m, SIOCSIFMETRIC);
53   PyModule_AddIntMacro(m, SIOCGIFMEM);
54   PyModule_AddIntMacro(m, SIOCSIFMEM);
55   PyModule_AddIntMacro(m, SIOCGIFMTU);
56   PyModule_AddIntMacro(m, SIOCSIFMTU);
57   PyModule_AddIntMacro(m, SIOCSIFNAME);
58   PyModule_AddIntMacro(m, SIOCSIFHWADDR);
59   PyModule_AddIntMacro(m, SIOCGIFENCAP);
60   PyModule_AddIntMacro(m, SIOCSIFENCAP);
61   PyModule_AddIntMacro(m, SIOCGIFHWADDR);
62   PyModule_AddIntMacro(m, SIOCGIFSLAVE);
63   PyModule_AddIntMacro(m, SIOCSIFSLAVE);
64   PyModule_AddIntMacro(m, SIOCADDMULTI);
65   PyModule_AddIntMacro(m, SIOCDELMULTI);
66   PyModule_AddIntMacro(m, SIOCGIFINDEX);
67   PyModule_AddIntMacro(m, SIOGIFINDEX);
68   PyModule_AddIntMacro(m, SIOCSIFPFLAGS);
69   PyModule_AddIntMacro(m, SIOCGIFPFLAGS);
70   PyModule_AddIntMacro(m, SIOCDIFADDR);
71   PyModule_AddIntMacro(m, SIOCSIFHWBROADCAST);
72   PyModule_AddIntMacro(m, SIOCGIFCOUNT);
73 
74   PyModule_AddIntMacro(m, SIOCGIFBR);
75   PyModule_AddIntMacro(m, SIOCSIFBR);
76 
77   PyModule_AddIntMacro(m, SIOCGIFTXQLEN);
78   PyModule_AddIntMacro(m, SIOCSIFTXQLEN);
79 
80   /* ARP cache control calls. */
81   /*  0x8950 - 0x8952  * obsolete calls, don't re-use */
82   PyModule_AddIntMacro(m, SIOCDARP);
83   PyModule_AddIntMacro(m, SIOCGARP);
84   PyModule_AddIntMacro(m, SIOCSARP);
85 
86   /* RARP cache control calls. */
87   PyModule_AddIntMacro(m, SIOCDRARP);
88   PyModule_AddIntMacro(m, SIOCGRARP);
89   PyModule_AddIntMacro(m, SIOCSRARP);
90 
91   /* Driver configuration calls */
92 
93   PyModule_AddIntMacro(m, SIOCGIFMAP);
94   PyModule_AddIntMacro(m, SIOCSIFMAP);
95 
96   /* DLCI configuration calls */
97 
98   PyModule_AddIntMacro(m, SIOCADDDLCI);
99   PyModule_AddIntMacro(m, SIOCDELDLCI);
100 
101   /* Device private ioctl calls.  */
102 
103   /* These 16 ioctls are available to devices via the do_ioctl() device
104      vector.  Each device should include this file and redefine these
105      names as their own. Because these are device dependent it is a good
106      idea _NOT_ to issue them to random objects and hope.  */
107 
108   PyModule_AddIntMacro(m, SIOCDEVPRIVATE);
109 
110   /*
111    *      These 16 ioctl calls are protocol private
112    */
113 
114   PyModule_AddIntMacro(m, SIOCPROTOPRIVATE);
115 }
116