PageRenderTime 58ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/raw_ethernet/src_wrappers/linux_if_h.ads

http://opencvada.googlecode.com/
Ada | 254 lines | 158 code | 23 blank | 73 comment | 0 complexity | f9ac075d9972634f18d6ece9fcda3122 MD5 | raw file
  1. with Interfaces.C; use Interfaces.C;
  2. limited with linux_hdlc_ioctl_h;
  3. with bits_socket_h;
  4. with System;
  5. with Interfaces.C.Strings;
  6. package linux_if_h is
  7. IFNAMSIZ : constant := 16; -- /usr/include/linux/if.h:26
  8. IFALIASZ : constant := 256; -- /usr/include/linux/if.h:27
  9. IFF_UP : constant := 16#1#; -- /usr/include/linux/if.h:31
  10. IFF_BROADCAST : constant := 16#2#; -- /usr/include/linux/if.h:32
  11. IFF_DEBUG : constant := 16#4#; -- /usr/include/linux/if.h:33
  12. IFF_LOOPBACK : constant := 16#8#; -- /usr/include/linux/if.h:34
  13. IFF_POINTOPOINT : constant := 16#10#; -- /usr/include/linux/if.h:35
  14. IFF_NOTRAILERS : constant := 16#20#; -- /usr/include/linux/if.h:36
  15. IFF_RUNNING : constant := 16#40#; -- /usr/include/linux/if.h:37
  16. IFF_NOARP : constant := 16#80#; -- /usr/include/linux/if.h:38
  17. IFF_PROMISC : constant := 16#100#; -- /usr/include/linux/if.h:39
  18. IFF_ALLMULTI : constant := 16#200#; -- /usr/include/linux/if.h:40
  19. IFF_MASTER : constant := 16#400#; -- /usr/include/linux/if.h:42
  20. IFF_SLAVE : constant := 16#800#; -- /usr/include/linux/if.h:43
  21. IFF_MULTICAST : constant := 16#1000#; -- /usr/include/linux/if.h:45
  22. IFF_PORTSEL : constant := 16#2000#; -- /usr/include/linux/if.h:47
  23. IFF_AUTOMEDIA : constant := 16#4000#; -- /usr/include/linux/if.h:48
  24. IFF_DYNAMIC : constant := 16#8000#; -- /usr/include/linux/if.h:49
  25. IFF_LOWER_UP : constant := 16#10000#; -- /usr/include/linux/if.h:51
  26. IFF_DORMANT : constant := 16#20000#; -- /usr/include/linux/if.h:52
  27. IFF_ECHO : constant := 16#40000#; -- /usr/include/linux/if.h:54
  28. -- unsupported macro: IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
  29. IFF_802_1Q_VLAN : constant := 16#1#; -- /usr/include/linux/if.h:60
  30. IFF_EBRIDGE : constant := 16#2#; -- /usr/include/linux/if.h:61
  31. IFF_SLAVE_INACTIVE : constant := 16#4#; -- /usr/include/linux/if.h:62
  32. IFF_MASTER_8023AD : constant := 16#8#; -- /usr/include/linux/if.h:63
  33. IFF_MASTER_ALB : constant := 16#10#; -- /usr/include/linux/if.h:64
  34. IFF_BONDING : constant := 16#20#; -- /usr/include/linux/if.h:65
  35. IFF_SLAVE_NEEDARP : constant := 16#40#; -- /usr/include/linux/if.h:66
  36. IFF_ISATAP : constant := 16#80#; -- /usr/include/linux/if.h:67
  37. IF_GET_IFACE : constant := 16#0001#; -- /usr/include/linux/if.h:69
  38. IF_GET_PROTO : constant := 16#0002#; -- /usr/include/linux/if.h:70
  39. IF_IFACE_V35 : constant := 16#1000#; -- /usr/include/linux/if.h:73
  40. IF_IFACE_V24 : constant := 16#1001#; -- /usr/include/linux/if.h:74
  41. IF_IFACE_X21 : constant := 16#1002#; -- /usr/include/linux/if.h:75
  42. IF_IFACE_T1 : constant := 16#1003#; -- /usr/include/linux/if.h:76
  43. IF_IFACE_E1 : constant := 16#1004#; -- /usr/include/linux/if.h:77
  44. IF_IFACE_SYNC_SERIAL : constant := 16#1005#; -- /usr/include/linux/if.h:78
  45. IF_IFACE_X21D : constant := 16#1006#; -- /usr/include/linux/if.h:79
  46. IF_PROTO_HDLC : constant := 16#2000#; -- /usr/include/linux/if.h:82
  47. IF_PROTO_PPP : constant := 16#2001#; -- /usr/include/linux/if.h:83
  48. IF_PROTO_CISCO : constant := 16#2002#; -- /usr/include/linux/if.h:84
  49. IF_PROTO_FR : constant := 16#2003#; -- /usr/include/linux/if.h:85
  50. IF_PROTO_FR_ADD_PVC : constant := 16#2004#; -- /usr/include/linux/if.h:86
  51. IF_PROTO_FR_DEL_PVC : constant := 16#2005#; -- /usr/include/linux/if.h:87
  52. IF_PROTO_X25 : constant := 16#2006#; -- /usr/include/linux/if.h:88
  53. IF_PROTO_HDLC_ETH : constant := 16#2007#; -- /usr/include/linux/if.h:89
  54. IF_PROTO_FR_ADD_ETH_PVC : constant := 16#2008#; -- /usr/include/linux/if.h:90
  55. IF_PROTO_FR_DEL_ETH_PVC : constant := 16#2009#; -- /usr/include/linux/if.h:91
  56. IF_PROTO_FR_PVC : constant := 16#200A#; -- /usr/include/linux/if.h:92
  57. IF_PROTO_FR_ETH_PVC : constant := 16#200B#; -- /usr/include/linux/if.h:93
  58. IF_PROTO_RAW : constant := 16#200C#; -- /usr/include/linux/if.h:94
  59. IFHWADDRLEN : constant := 6; -- /usr/include/linux/if.h:161
  60. -- unsupported macro: ifr_name ifr_ifrn.ifrn_name
  61. -- unsupported macro: ifr_hwaddr ifr_ifru.ifru_hwaddr
  62. -- unsupported macro: ifr_addr ifr_ifru.ifru_addr
  63. -- unsupported macro: ifr_dstaddr ifr_ifru.ifru_dstaddr
  64. -- unsupported macro: ifr_broadaddr ifr_ifru.ifru_broadaddr
  65. -- unsupported macro: ifr_netmask ifr_ifru.ifru_netmask
  66. -- unsupported macro: ifr_flags ifr_ifru.ifru_flags
  67. -- unsupported macro: ifr_metric ifr_ifru.ifru_ivalue
  68. -- unsupported macro: ifr_mtu ifr_ifru.ifru_mtu
  69. -- unsupported macro: ifr_map ifr_ifru.ifru_map
  70. -- unsupported macro: ifr_slave ifr_ifru.ifru_slave
  71. -- unsupported macro: ifr_data ifr_ifru.ifru_data
  72. -- unsupported macro: ifr_ifindex ifr_ifru.ifru_ivalue
  73. -- unsupported macro: ifr_bandwidth ifr_ifru.ifru_ivalue
  74. -- unsupported macro: ifr_qlen ifr_ifru.ifru_ivalue
  75. -- unsupported macro: ifr_newname ifr_ifru.ifru_newname
  76. -- unsupported macro: ifr_settings ifr_ifru.ifru_settings
  77. -- unsupported macro: ifc_buf ifc_ifcu.ifcu_buf
  78. -- unsupported macro: ifc_req ifc_ifcu.ifcu_req
  79. -- * INET An implementation of the TCP/IP protocol suite for the LINUX
  80. -- * operating system. INET is implemented using the BSD Socket
  81. -- * interface as the means of communication with the user level.
  82. -- *
  83. -- * Global definitions for the INET interface module.
  84. -- *
  85. -- * Version: @(#)if.h 1.0.2 04/18/93
  86. -- *
  87. -- * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988
  88. -- * Ross Biro
  89. -- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  90. -- *
  91. -- * This program is free software; you can redistribute it and/or
  92. -- * modify it under the terms of the GNU General Public License
  93. -- * as published by the Free Software Foundation; either version
  94. -- * 2 of the License, or (at your option) any later version.
  95. --
  96. -- for "__kernel_caddr_t" et al
  97. -- for "struct sockaddr" et al
  98. -- for "__user" et al
  99. -- Standard interface flags (netdevice->flags).
  100. -- Private (from user) interface flags (netdevice->priv_flags).
  101. -- For definitions see hdlc.h
  102. -- For definitions see hdlc.h
  103. -- RFC 2863 operational status
  104. -- link modes
  105. -- limit upward transition to dormant
  106. -- * Device mapping structure. I'd just gone off and designed a
  107. -- * beautiful scheme using only loadable modules with arguments
  108. -- * for driver options and along come the PCMCIA people 8)
  109. -- *
  110. -- * Ah well. The get() side of this is good for WDSETUP, and it'll
  111. -- * be handy for debugging things. The set side is fine for now and
  112. -- * being very small might be worth keeping for clean configuration.
  113. --
  114. type ifmap is record
  115. mem_start : aliased unsigned_long; -- /usr/include/linux/if.h:125:16
  116. mem_end : aliased unsigned_long; -- /usr/include/linux/if.h:126:16
  117. base_addr : aliased unsigned_short; -- /usr/include/linux/if.h:127:17
  118. irq : aliased unsigned_char; -- /usr/include/linux/if.h:128:16
  119. dma : aliased unsigned_char; -- /usr/include/linux/if.h:129:16
  120. port : aliased unsigned_char; -- /usr/include/linux/if.h:130:16
  121. end record;
  122. pragma Convention (C, ifmap); -- /usr/include/linux/if.h:124:1
  123. -- 3 bytes spare
  124. -- Type of physical device or protocol
  125. type anon_29 (discr : unsigned := 0) is record
  126. case discr is
  127. when 0 =>
  128. raw_hdlc : access linux_hdlc_ioctl_h.raw_hdlc_proto; -- /usr/include/linux/if.h:140:20
  129. when 1 =>
  130. cisco : access linux_hdlc_ioctl_h.cisco_proto; -- /usr/include/linux/if.h:141:17
  131. when 2 =>
  132. fr : access linux_hdlc_ioctl_h.fr_proto; -- /usr/include/linux/if.h:142:14
  133. when 3 =>
  134. fr_pvc : access linux_hdlc_ioctl_h.fr_proto_pvc; -- /usr/include/linux/if.h:143:18
  135. when 4 =>
  136. fr_pvc_info : access linux_hdlc_ioctl_h.fr_proto_pvc_info; -- /usr/include/linux/if.h:144:22
  137. when 5 =>
  138. sync : access linux_hdlc_ioctl_h.sync_serial_settings; -- /usr/include/linux/if.h:147:25
  139. when others =>
  140. te1 : access linux_hdlc_ioctl_h.te1_settings; -- /usr/include/linux/if.h:148:18
  141. end case;
  142. end record;
  143. pragma Convention (C, anon_29);
  144. pragma Unchecked_Union (anon_29);
  145. type if_settings is record
  146. c_type : aliased unsigned; -- /usr/include/linux/if.h:136:15
  147. size : aliased unsigned; -- /usr/include/linux/if.h:137:15
  148. ifs_ifsu : aliased anon_29; -- /usr/include/linux/if.h:149:4
  149. end record;
  150. pragma Convention (C, if_settings); -- /usr/include/linux/if.h:135:1
  151. -- Size of the data allocated by the caller
  152. -- {atm/eth/dsl}_settings anyone ?
  153. -- interface settings
  154. -- * Interface request structure used for socket
  155. -- * ioctl's. All interface ioctl's must have parameter
  156. -- * definitions which begin with ifr_name. The
  157. -- * remainder may be interface specific.
  158. --
  159. -- if name, e.g. "en0"
  160. type ifreq_ifrn_name_array is array (0 .. 15) of aliased char;
  161. type anon_30 (discr : unsigned := 0) is record
  162. case discr is
  163. when others =>
  164. ifrn_name : aliased ifreq_ifrn_name_array; -- /usr/include/linux/if.h:164:26
  165. end case;
  166. end record;
  167. pragma Convention (C, anon_30);
  168. pragma Unchecked_Union (anon_30);
  169. type ifreq_ifru_slave_array is array (0 .. 15) of aliased char;
  170. type ifreq_ifru_newname_array is array (0 .. 15) of aliased char;
  171. type anon_31 (discr : unsigned := 0) is record
  172. case discr is
  173. when 0 =>
  174. ifru_addr : aliased bits_socket_h.sockaddr; -- /usr/include/linux/if.h:168:19
  175. when 1 =>
  176. ifru_dstaddr : aliased bits_socket_h.sockaddr; -- /usr/include/linux/if.h:169:19
  177. when 2 =>
  178. ifru_broadaddr : aliased bits_socket_h.sockaddr; -- /usr/include/linux/if.h:170:19
  179. when 3 =>
  180. ifru_netmask : aliased bits_socket_h.sockaddr; -- /usr/include/linux/if.h:171:19
  181. when 4 =>
  182. ifru_hwaddr : aliased bits_socket_h.sockaddr; -- /usr/include/linux/if.h:172:20
  183. when 5 =>
  184. ifru_flags : aliased short; -- /usr/include/linux/if.h:173:9
  185. when 6 =>
  186. ifru_ivalue : aliased int; -- /usr/include/linux/if.h:174:7
  187. when 7 =>
  188. ifru_mtu : aliased int; -- /usr/include/linux/if.h:175:7
  189. when 8 =>
  190. ifru_map : aliased ifmap; -- /usr/include/linux/if.h:176:17
  191. when 9 =>
  192. ifru_slave : aliased ifreq_ifru_slave_array; -- /usr/include/linux/if.h:177:27
  193. when 10 =>
  194. ifru_newname : aliased ifreq_ifru_newname_array; -- /usr/include/linux/if.h:178:29
  195. when 11 =>
  196. ifru_data : System.Address; -- /usr/include/linux/if.h:179:10
  197. when others =>
  198. ifru_settings : aliased if_settings; -- /usr/include/linux/if.h:180:22
  199. end case;
  200. end record;
  201. pragma Convention (C, anon_31);
  202. pragma Unchecked_Union (anon_31);
  203. type ifreq is record
  204. ifr_ifrn : aliased anon_30; -- /usr/include/linux/if.h:165:4
  205. ifr_ifru : aliased anon_31; -- /usr/include/linux/if.h:181:4
  206. end record;
  207. pragma Convention (C, ifreq); -- /usr/include/linux/if.h:160:1
  208. type Ifreq_Ptr is access all Ifreq;
  209. -- Just fits the size
  210. -- * Structure used in SIOCGIFCONF request.
  211. -- * Used to retrieve interface configuration
  212. -- * for machine (useful for programs which
  213. -- * must know all networks accessible).
  214. --
  215. -- size of buffer
  216. type anon_32 (discr : unsigned := 0) is record
  217. case discr is
  218. when 0 =>
  219. ifcu_buf : Interfaces.C.Strings.chars_ptr; -- /usr/include/linux/if.h:214:9
  220. when others =>
  221. ifcu_req : access ifreq; -- /usr/include/linux/if.h:215:17
  222. end case;
  223. end record;
  224. pragma Convention (C, anon_32);
  225. pragma Unchecked_Union (anon_32);
  226. type ifconf is record
  227. ifc_len : aliased int; -- /usr/include/linux/if.h:211:6
  228. ifc_ifcu : aliased anon_32; -- /usr/include/linux/if.h:216:4
  229. end record;
  230. pragma Convention (C, ifconf); -- /usr/include/linux/if.h:210:1
  231. end linux_if_h;