sysctl_check.c 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575
  1. #include <linux/stat.h>
  2. #include <linux/sysctl.h>
  3. #include "../arch/s390/appldata/appldata.h"
  4. #include "../fs/xfs/linux-2.6/xfs_sysctl.h"
  5. #include <linux/sunrpc/debug.h>
  6. #include <linux/string.h>
  7. #include <net/ip_vs.h>
  8. struct trans_ctl_table {
  9. int ctl_name;
  10. const char *procname;
  11. struct trans_ctl_table *child;
  12. };
  13. static struct trans_ctl_table trans_random_table[] = {
  14. { RANDOM_POOLSIZE, "poolsize" },
  15. { RANDOM_ENTROPY_COUNT, "entropy_avail" },
  16. { RANDOM_READ_THRESH, "read_wakeup_threshold" },
  17. { RANDOM_WRITE_THRESH, "write_wakeup_threshold" },
  18. { RANDOM_BOOT_ID, "boot_id" },
  19. { RANDOM_UUID, "uuid" },
  20. {}
  21. };
  22. static struct trans_ctl_table trans_pty_table[] = {
  23. { PTY_MAX, "max" },
  24. { PTY_NR, "nr" },
  25. {}
  26. };
  27. static struct trans_ctl_table trans_kern_table[] = {
  28. { KERN_OSTYPE, "ostype" },
  29. { KERN_OSRELEASE, "osrelease" },
  30. /* KERN_OSREV not used */
  31. { KERN_VERSION, "version" },
  32. /* KERN_SECUREMASK not used */
  33. /* KERN_PROF not used */
  34. { KERN_NODENAME, "hostname" },
  35. { KERN_DOMAINNAME, "domainname" },
  36. #ifdef CONFIG_SECURITY_CAPABILITIES
  37. { KERN_CAP_BSET, "cap-bound" },
  38. #endif /* def CONFIG_SECURITY_CAPABILITIES */
  39. { KERN_PANIC, "panic" },
  40. { KERN_REALROOTDEV, "real-root-dev" },
  41. { KERN_SPARC_REBOOT, "reboot-cmd" },
  42. { KERN_CTLALTDEL, "ctrl-alt-del" },
  43. { KERN_PRINTK, "printk" },
  44. /* KERN_NAMETRANS not used */
  45. /* KERN_PPC_HTABRECLAIM not used */
  46. /* KERN_PPC_ZEROPAGED not used */
  47. { KERN_PPC_POWERSAVE_NAP, "powersave-nap" },
  48. { KERN_MODPROBE, "modprobe" },
  49. { KERN_SG_BIG_BUFF, "sg-big-buff" },
  50. { KERN_ACCT, "acct" },
  51. { KERN_PPC_L2CR, "l2cr" },
  52. /* KERN_RTSIGNR not used */
  53. /* KERN_RTSIGMAX not used */
  54. { KERN_SHMMAX, "shmmax" },
  55. { KERN_MSGMAX, "msgmax" },
  56. { KERN_MSGMNB, "msgmnb" },
  57. /* KERN_MSGPOOL not used*/
  58. { KERN_SYSRQ, "sysrq" },
  59. { KERN_MAX_THREADS, "threads-max" },
  60. { KERN_RANDOM, "random", trans_random_table },
  61. { KERN_SHMALL, "shmall" },
  62. { KERN_MSGMNI, "msgmni" },
  63. { KERN_SEM, "sem" },
  64. { KERN_SPARC_STOP_A, "stop-a" },
  65. { KERN_SHMMNI, "shmmni" },
  66. { KERN_OVERFLOWUID, "overflowuid" },
  67. { KERN_OVERFLOWGID, "overflowgid" },
  68. { KERN_HOTPLUG, "hotplug", },
  69. { KERN_IEEE_EMULATION_WARNINGS, "ieee_emulation_warnings" },
  70. { KERN_S390_USER_DEBUG_LOGGING, "userprocess_debug" },
  71. { KERN_CORE_USES_PID, "core_uses_pid" },
  72. { KERN_TAINTED, "tainted" },
  73. { KERN_CADPID, "cad_pid" },
  74. { KERN_PIDMAX, "pid_max" },
  75. { KERN_CORE_PATTERN, "core_pattern" },
  76. { KERN_PANIC_ON_OOPS, "panic_on_oops" },
  77. { KERN_HPPA_PWRSW, "soft-power" },
  78. { KERN_HPPA_UNALIGNED, "unaligned-trap" },
  79. { KERN_PRINTK_RATELIMIT, "printk_ratelimit" },
  80. { KERN_PRINTK_RATELIMIT_BURST, "printk_ratelimit_burst" },
  81. { KERN_PTY, "pty", trans_pty_table },
  82. { KERN_NGROUPS_MAX, "ngroups_max" },
  83. { KERN_SPARC_SCONS_PWROFF, "scons_poweroff" },
  84. { KERN_HZ_TIMER, "hz_timer" },
  85. { KERN_UNKNOWN_NMI_PANIC, "unknown_nmi_panic" },
  86. { KERN_BOOTLOADER_TYPE, "bootloader_type" },
  87. { KERN_RANDOMIZE, "randomize_va_space" },
  88. { KERN_SPIN_RETRY, "spin_retry" },
  89. { KERN_ACPI_VIDEO_FLAGS, "acpi_video_flags" },
  90. { KERN_IA64_UNALIGNED, "ignore-unaligned-usertrap" },
  91. { KERN_COMPAT_LOG, "compat-log" },
  92. { KERN_MAX_LOCK_DEPTH, "max_lock_depth" },
  93. { KERN_NMI_WATCHDOG, "nmi_watchdog" },
  94. { KERN_PANIC_ON_NMI, "panic_on_unrecovered_nmi" },
  95. {}
  96. };
  97. static struct trans_ctl_table trans_vm_table[] = {
  98. { VM_OVERCOMMIT_MEMORY, "overcommit_memory" },
  99. { VM_PAGE_CLUSTER, "page-cluster" },
  100. { VM_DIRTY_BACKGROUND, "dirty_background_ratio" },
  101. { VM_DIRTY_RATIO, "dirty_ratio" },
  102. { VM_DIRTY_WB_CS, "dirty_writeback_centisecs" },
  103. { VM_DIRTY_EXPIRE_CS, "dirty_expire_centisecs" },
  104. { VM_NR_PDFLUSH_THREADS, "nr_pdflush_threads" },
  105. { VM_OVERCOMMIT_RATIO, "overcommit_ratio" },
  106. /* VM_PAGEBUF unused */
  107. { VM_HUGETLB_PAGES, "nr_hugepages" },
  108. { VM_SWAPPINESS, "swappiness" },
  109. { VM_LOWMEM_RESERVE_RATIO, "lowmem_reserve_ratio" },
  110. { VM_MIN_FREE_KBYTES, "min_free_kbytes" },
  111. { VM_MAX_MAP_COUNT, "max_map_count" },
  112. { VM_LAPTOP_MODE, "laptop_mode" },
  113. { VM_BLOCK_DUMP, "block_dump" },
  114. { VM_HUGETLB_GROUP, "hugetlb_shm_group" },
  115. { VM_VFS_CACHE_PRESSURE, "vfs_cache_pressure" },
  116. { VM_LEGACY_VA_LAYOUT, "legacy_va_layout" },
  117. /* VM_SWAP_TOKEN_TIMEOUT unused */
  118. { VM_DROP_PAGECACHE, "drop_caches" },
  119. { VM_PERCPU_PAGELIST_FRACTION, "percpu_pagelist_fraction" },
  120. { VM_ZONE_RECLAIM_MODE, "zone_reclaim_mode" },
  121. { VM_MIN_UNMAPPED, "min_unmapped_ratio" },
  122. { VM_PANIC_ON_OOM, "panic_on_oom" },
  123. { VM_VDSO_ENABLED, "vdso_enabled" },
  124. { VM_MIN_SLAB, "min_slab_ratio" },
  125. {}
  126. };
  127. static struct trans_ctl_table trans_net_core_table[] = {
  128. { NET_CORE_WMEM_MAX, "wmem_max" },
  129. { NET_CORE_RMEM_MAX, "rmem_max" },
  130. { NET_CORE_WMEM_DEFAULT, "wmem_default" },
  131. { NET_CORE_RMEM_DEFAULT, "rmem_default" },
  132. /* NET_CORE_DESTROY_DELAY unused */
  133. { NET_CORE_MAX_BACKLOG, "netdev_max_backlog" },
  134. /* NET_CORE_FASTROUTE unused */
  135. { NET_CORE_MSG_COST, "message_cost" },
  136. { NET_CORE_MSG_BURST, "message_burst" },
  137. { NET_CORE_OPTMEM_MAX, "optmem_max" },
  138. /* NET_CORE_HOT_LIST_LENGTH unused */
  139. /* NET_CORE_DIVERT_VERSION unused */
  140. /* NET_CORE_NO_CONG_THRESH unused */
  141. /* NET_CORE_NO_CONG unused */
  142. /* NET_CORE_LO_CONG unused */
  143. /* NET_CORE_MOD_CONG unused */
  144. { NET_CORE_DEV_WEIGHT, "dev_weight" },
  145. { NET_CORE_SOMAXCONN, "somaxconn" },
  146. { NET_CORE_BUDGET, "netdev_budget" },
  147. { NET_CORE_AEVENT_ETIME, "xfrm_aevent_etime" },
  148. { NET_CORE_AEVENT_RSEQTH, "xfrm_aevent_rseqth" },
  149. { NET_CORE_WARNINGS, "warnings" },
  150. {},
  151. };
  152. static struct trans_ctl_table trans_net_unix_table[] = {
  153. /* NET_UNIX_DESTROY_DELAY unused */
  154. /* NET_UNIX_DELETE_DELAY unused */
  155. { NET_UNIX_MAX_DGRAM_QLEN, "max_dgram_qlen" },
  156. {}
  157. };
  158. static struct trans_ctl_table trans_net_ipv4_route_table[] = {
  159. { NET_IPV4_ROUTE_FLUSH, "flush" },
  160. { NET_IPV4_ROUTE_MIN_DELAY, "min_delay" },
  161. { NET_IPV4_ROUTE_MAX_DELAY, "max_delay" },
  162. { NET_IPV4_ROUTE_GC_THRESH, "gc_thresh" },
  163. { NET_IPV4_ROUTE_MAX_SIZE, "max_size" },
  164. { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "gc_min_interval" },
  165. { NET_IPV4_ROUTE_GC_TIMEOUT, "gc_timeout" },
  166. { NET_IPV4_ROUTE_GC_INTERVAL, "gc_interval" },
  167. { NET_IPV4_ROUTE_REDIRECT_LOAD, "redirect_load" },
  168. { NET_IPV4_ROUTE_REDIRECT_NUMBER, "redirect_number" },
  169. { NET_IPV4_ROUTE_REDIRECT_SILENCE, "redirect_silence" },
  170. { NET_IPV4_ROUTE_ERROR_COST, "error_cost" },
  171. { NET_IPV4_ROUTE_ERROR_BURST, "error_burst" },
  172. { NET_IPV4_ROUTE_GC_ELASTICITY, "gc_elasticity" },
  173. { NET_IPV4_ROUTE_MTU_EXPIRES, "mtu_expires" },
  174. { NET_IPV4_ROUTE_MIN_PMTU, "min_pmtu" },
  175. { NET_IPV4_ROUTE_MIN_ADVMSS, "min_adv_mss" },
  176. { NET_IPV4_ROUTE_SECRET_INTERVAL, "secret_interval" },
  177. { NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, "gc_min_interval_ms" },
  178. {}
  179. };
  180. static struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = {
  181. { NET_IPV4_CONF_FORWARDING, "forwarding" },
  182. { NET_IPV4_CONF_MC_FORWARDING, "mc_forwarding" },
  183. { NET_IPV4_CONF_PROXY_ARP, "proxy_arp" },
  184. { NET_IPV4_CONF_ACCEPT_REDIRECTS, "accept_redirects" },
  185. { NET_IPV4_CONF_SECURE_REDIRECTS, "secure_redirects" },
  186. { NET_IPV4_CONF_SEND_REDIRECTS, "send_redirects" },
  187. { NET_IPV4_CONF_SHARED_MEDIA, "shared_media" },
  188. { NET_IPV4_CONF_RP_FILTER, "rp_filter" },
  189. { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "accept_source_route" },
  190. { NET_IPV4_CONF_BOOTP_RELAY, "bootp_relay" },
  191. { NET_IPV4_CONF_LOG_MARTIANS, "log_martians" },
  192. { NET_IPV4_CONF_TAG, "tag" },
  193. { NET_IPV4_CONF_ARPFILTER, "arp_filter" },
  194. { NET_IPV4_CONF_MEDIUM_ID, "medium_id" },
  195. { NET_IPV4_CONF_NOXFRM, "disable_xfrm" },
  196. { NET_IPV4_CONF_NOPOLICY, "disable_policy" },
  197. { NET_IPV4_CONF_FORCE_IGMP_VERSION, "force_igmp_version" },
  198. { NET_IPV4_CONF_ARP_ANNOUNCE, "arp_announce" },
  199. { NET_IPV4_CONF_ARP_IGNORE, "arp_ignore" },
  200. { NET_IPV4_CONF_PROMOTE_SECONDARIES, "promote_secondaries" },
  201. { NET_IPV4_CONF_ARP_ACCEPT, "arp_accept" },
  202. {}
  203. };
  204. static struct trans_ctl_table trans_net_ipv4_conf_table[] = {
  205. { NET_PROTO_CONF_ALL, "all", trans_net_ipv4_conf_vars_table },
  206. { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv4_conf_vars_table },
  207. { 0, NULL, trans_net_ipv4_conf_vars_table },
  208. {}
  209. };
  210. static struct trans_ctl_table trans_net_ipv4_vs_table[] = {
  211. { NET_IPV4_VS_AMEMTHRESH, "amemthresh" },
  212. { NET_IPV4_VS_DEBUG_LEVEL, "debug_level" },
  213. { NET_IPV4_VS_AMDROPRATE, "am_droprate" },
  214. { NET_IPV4_VS_DROP_ENTRY, "drop_entry" },
  215. { NET_IPV4_VS_DROP_PACKET, "drop_packet" },
  216. { NET_IPV4_VS_SECURE_TCP, "secure_tcp" },
  217. { NET_IPV4_VS_TO_ES, "timeout_established" },
  218. { NET_IPV4_VS_TO_SS, "timeout_synsent" },
  219. { NET_IPV4_VS_TO_SR, "timeout_synrecv" },
  220. { NET_IPV4_VS_TO_FW, "timeout_finwait" },
  221. { NET_IPV4_VS_TO_TW, "timeout_timewait" },
  222. { NET_IPV4_VS_TO_CL, "timeout_close" },
  223. { NET_IPV4_VS_TO_CW, "timeout_closewait" },
  224. { NET_IPV4_VS_TO_LA, "timeout_lastack" },
  225. { NET_IPV4_VS_TO_LI, "timeout_listen" },
  226. { NET_IPV4_VS_TO_SA, "timeout_synack" },
  227. { NET_IPV4_VS_TO_UDP, "timeout_udp" },
  228. { NET_IPV4_VS_TO_ICMP, "timeout_icmp" },
  229. { NET_IPV4_VS_CACHE_BYPASS, "cache_bypass" },
  230. { NET_IPV4_VS_EXPIRE_NODEST_CONN, "expire_nodest_conn" },
  231. { NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE, "expire_quiescent_template" },
  232. { NET_IPV4_VS_SYNC_THRESHOLD, "sync_threshold" },
  233. { NET_IPV4_VS_NAT_ICMP_SEND, "nat_icmp_send" },
  234. { NET_IPV4_VS_LBLC_EXPIRE, "lblc_expiration" },
  235. { NET_IPV4_VS_LBLCR_EXPIRE, "lblcr_expiration" },
  236. {}
  237. };
  238. static struct trans_ctl_table trans_net_neigh_vars_table[] = {
  239. { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" },
  240. { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" },
  241. { NET_NEIGH_APP_SOLICIT, "app_solicit" },
  242. { NET_NEIGH_RETRANS_TIME, "retrans_time" },
  243. { NET_NEIGH_REACHABLE_TIME, "base_reachable_time" },
  244. { NET_NEIGH_DELAY_PROBE_TIME, "delay_first_probe_time" },
  245. { NET_NEIGH_GC_STALE_TIME, "gc_stale_time" },
  246. { NET_NEIGH_UNRES_QLEN, "unres_qlen" },
  247. { NET_NEIGH_PROXY_QLEN, "proxy_qlen" },
  248. { NET_NEIGH_ANYCAST_DELAY, "anycast_delay" },
  249. { NET_NEIGH_PROXY_DELAY, "proxy_delay" },
  250. { NET_NEIGH_LOCKTIME, "locktime" },
  251. { NET_NEIGH_GC_INTERVAL, "gc_interval" },
  252. { NET_NEIGH_GC_THRESH1, "gc_thresh1" },
  253. { NET_NEIGH_GC_THRESH2, "gc_thresh2" },
  254. { NET_NEIGH_GC_THRESH3, "gc_thresh3" },
  255. { NET_NEIGH_RETRANS_TIME_MS, "retrans_time_ms" },
  256. { NET_NEIGH_REACHABLE_TIME_MS, "base_reachable_time_ms" },
  257. {}
  258. };
  259. static struct trans_ctl_table trans_net_neigh_table[] = {
  260. { NET_PROTO_CONF_DEFAULT, "default", trans_net_neigh_vars_table },
  261. { 0, NULL, trans_net_neigh_vars_table },
  262. {}
  263. };
  264. static struct trans_ctl_table trans_net_ipv4_netfilter_table[] = {
  265. { NET_IPV4_NF_CONNTRACK_MAX, "ip_conntrack_max" },
  266. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "ip_conntrack_tcp_timeout_syn_sent" },
  267. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV, "ip_conntrack_tcp_timeout_syn_recv" },
  268. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED, "ip_conntrack_tcp_timeout_established" },
  269. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT, "ip_conntrack_tcp_timeout_fin_wait" },
  270. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT, "ip_conntrack_tcp_timeout_close_wait" },
  271. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK, "ip_conntrack_tcp_timeout_last_ack" },
  272. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT, "ip_conntrack_tcp_timeout_time_wait" },
  273. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE, "ip_conntrack_tcp_timeout_close" },
  274. { NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT, "ip_conntrack_udp_timeout" },
  275. { NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM, "ip_conntrack_udp_timeout_stream" },
  276. { NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT, "ip_conntrack_icmp_timeout" },
  277. { NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT, "ip_conntrack_generic_timeout" },
  278. { NET_IPV4_NF_CONNTRACK_BUCKETS, "ip_conntrack_buckets" },
  279. { NET_IPV4_NF_CONNTRACK_LOG_INVALID, "ip_conntrack_log_invalid" },
  280. { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS, "ip_conntrack_tcp_timeout_max_retrans" },
  281. { NET_IPV4_NF_CONNTRACK_TCP_LOOSE, "ip_conntrack_tcp_loose" },
  282. { NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL, "ip_conntrack_tcp_be_liberal" },
  283. { NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS, "ip_conntrack_tcp_max_retrans" },
  284. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED, "ip_conntrack_sctp_timeout_closed" },
  285. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT, "ip_conntrack_sctp_timeout_cookie_wait" },
  286. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED, "ip_conntrack_sctp_timeout_cookie_echoed" },
  287. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED, "ip_conntrack_sctp_timeout_established" },
  288. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT, "ip_conntrack_sctp_timeout_shutdown_sent" },
  289. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD, "ip_conntrack_sctp_timeout_shutdown_recd" },
  290. { NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT, "ip_conntrack_sctp_timeout_shutdown_ack_sent" },
  291. { NET_IPV4_NF_CONNTRACK_COUNT, "ip_conntrack_count" },
  292. { NET_IPV4_NF_CONNTRACK_CHECKSUM, "ip_conntrack_checksum" },
  293. {}
  294. };
  295. static struct trans_ctl_table trans_net_ipv4_table[] = {
  296. { NET_IPV4_FORWARD, "ip_forward" },
  297. { NET_IPV4_DYNADDR, "ip_dynaddr" },
  298. { NET_IPV4_CONF, "conf", trans_net_ipv4_conf_table },
  299. { NET_IPV4_NEIGH, "neigh", trans_net_neigh_table },
  300. { NET_IPV4_ROUTE, "route", trans_net_ipv4_route_table },
  301. /* NET_IPV4_FIB_HASH unused */
  302. { NET_IPV4_NETFILTER, "netfilter", trans_net_ipv4_netfilter_table },
  303. { NET_IPV4_VS, "vs", trans_net_ipv4_vs_table },
  304. { NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps" },
  305. { NET_IPV4_TCP_WINDOW_SCALING, "tcp_window_scaling" },
  306. { NET_IPV4_TCP_SACK, "tcp_sack" },
  307. { NET_IPV4_TCP_RETRANS_COLLAPSE, "tcp_retrans_collapse" },
  308. { NET_IPV4_DEFAULT_TTL, "ip_default_ttl" },
  309. /* NET_IPV4_AUTOCONFIG unused */
  310. { NET_IPV4_NO_PMTU_DISC, "ip_no_pmtu_disc" },
  311. { NET_IPV4_TCP_SYN_RETRIES, "tcp_syn_retries" },
  312. { NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh" },
  313. { NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh" },
  314. { NET_IPV4_IPFRAG_TIME, "ipfrag_time" },
  315. /* NET_IPV4_TCP_MAX_KA_PROBES unused */
  316. { NET_IPV4_TCP_KEEPALIVE_TIME, "tcp_keepalive_time" },
  317. { NET_IPV4_TCP_KEEPALIVE_PROBES, "tcp_keepalive_probes" },
  318. { NET_IPV4_TCP_RETRIES1, "tcp_retries1" },
  319. { NET_IPV4_TCP_RETRIES2, "tcp_retries2" },
  320. { NET_IPV4_TCP_FIN_TIMEOUT, "tcp_fin_timeout" },
  321. /* NET_IPV4_IP_MASQ_DEBUG unused */
  322. { NET_TCP_SYNCOOKIES, "tcp_syncookies" },
  323. { NET_TCP_STDURG, "tcp_stdurg" },
  324. { NET_TCP_RFC1337, "tcp_rfc1337" },
  325. /* NET_TCP_SYN_TAILDROP unused */
  326. { NET_TCP_MAX_SYN_BACKLOG, "tcp_max_syn_backlog" },
  327. { NET_IPV4_LOCAL_PORT_RANGE, "ip_local_port_range" },
  328. { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "icmp_echo_ignore_all" },
  329. { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "icmp_echo_ignore_broadcasts" },
  330. /* NET_IPV4_ICMP_SOURCEQUENCH_RATE unused */
  331. /* NET_IPV4_ICMP_DESTUNREACH_RATE unused */
  332. /* NET_IPV4_ICMP_TIMEEXCEED_RATE unused */
  333. /* NET_IPV4_ICMP_PARAMPROB_RATE unused */
  334. /* NET_IPV4_ICMP_ECHOREPLY_RATE unused */
  335. { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "icmp_ignore_bogus_error_responses" },
  336. { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "igmp_max_memberships" },
  337. { NET_TCP_TW_RECYCLE, "tcp_tw_recycle" },
  338. /* NET_IPV4_ALWAYS_DEFRAG unused */
  339. { NET_IPV4_TCP_KEEPALIVE_INTVL, "tcp_keepalive_intvl" },
  340. { NET_IPV4_INET_PEER_THRESHOLD, "inet_peer_threshold" },
  341. { NET_IPV4_INET_PEER_MINTTL, "inet_peer_minttl" },
  342. { NET_IPV4_INET_PEER_MAXTTL, "inet_peer_maxttl" },
  343. { NET_IPV4_INET_PEER_GC_MINTIME, "inet_peer_gc_mintime" },
  344. { NET_IPV4_INET_PEER_GC_MAXTIME, "inet_peer_gc_maxtime" },
  345. { NET_TCP_ORPHAN_RETRIES, "tcp_orphan_retries" },
  346. { NET_TCP_ABORT_ON_OVERFLOW, "tcp_abort_on_overflow" },
  347. { NET_TCP_SYNACK_RETRIES, "tcp_synack_retries" },
  348. { NET_TCP_MAX_ORPHANS, "tcp_max_orphans" },
  349. { NET_TCP_MAX_TW_BUCKETS, "tcp_max_tw_buckets" },
  350. { NET_TCP_FACK, "tcp_fack" },
  351. { NET_TCP_REORDERING, "tcp_reordering" },
  352. { NET_TCP_ECN, "tcp_ecn" },
  353. { NET_TCP_DSACK, "tcp_dsack" },
  354. { NET_TCP_MEM, "tcp_mem" },
  355. { NET_TCP_WMEM, "tcp_wmem" },
  356. { NET_TCP_RMEM, "tcp_rmem" },
  357. { NET_TCP_APP_WIN, "tcp_app_win" },
  358. { NET_TCP_ADV_WIN_SCALE, "tcp_adv_win_scale" },
  359. { NET_IPV4_NONLOCAL_BIND, "ip_nonlocal_bind" },
  360. { NET_IPV4_ICMP_RATELIMIT, "icmp_ratelimit" },
  361. { NET_IPV4_ICMP_RATEMASK, "icmp_ratemask" },
  362. { NET_TCP_TW_REUSE, "tcp_tw_reuse" },
  363. { NET_TCP_FRTO, "tcp_frto" },
  364. { NET_TCP_LOW_LATENCY, "tcp_low_latency" },
  365. { NET_IPV4_IPFRAG_SECRET_INTERVAL, "ipfrag_secret_interval" },
  366. { NET_IPV4_IGMP_MAX_MSF, "igmp_max_msf" },
  367. { NET_TCP_NO_METRICS_SAVE, "tcp_no_metrics_save" },
  368. /* NET_TCP_DEFAULT_WIN_SCALE unused */
  369. { NET_TCP_MODERATE_RCVBUF, "tcp_moderate_rcvbuf" },
  370. { NET_TCP_TSO_WIN_DIVISOR, "tcp_tso_win_divisor" },
  371. /* NET_TCP_BIC_BETA unused */
  372. { NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, "icmp_errors_use_inbound_ifaddr" },
  373. { NET_TCP_CONG_CONTROL, "tcp_congestion_control" },
  374. { NET_TCP_ABC, "tcp_abc" },
  375. { NET_IPV4_IPFRAG_MAX_DIST, "ipfrag_max_dist" },
  376. { NET_TCP_MTU_PROBING, "tcp_mtu_probing" },
  377. { NET_TCP_BASE_MSS, "tcp_base_mss" },
  378. { NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS, "tcp_workaround_signed_windows" },
  379. { NET_TCP_DMA_COPYBREAK, "tcp_dma_copybreak" },
  380. { NET_TCP_SLOW_START_AFTER_IDLE, "tcp_slow_start_after_idle" },
  381. { NET_CIPSOV4_CACHE_ENABLE, "cipso_cache_enable" },
  382. { NET_CIPSOV4_CACHE_BUCKET_SIZE, "cipso_cache_bucket_size" },
  383. { NET_CIPSOV4_RBM_OPTFMT, "cipso_rbm_optfmt" },
  384. { NET_CIPSOV4_RBM_STRICTVALID, "cipso_rbm_strictvalid" },
  385. { NET_TCP_AVAIL_CONG_CONTROL, "tcp_available_congestion_control" },
  386. { NET_TCP_ALLOWED_CONG_CONTROL, "tcp_allowed_congestion_control" },
  387. { NET_TCP_MAX_SSTHRESH, "tcp_max_ssthresh" },
  388. { NET_TCP_FRTO_RESPONSE, "tcp_frto_response" },
  389. { 2088 /* NET_IPQ_QMAX */, "ip_queue_maxlen" },
  390. {}
  391. };
  392. static struct trans_ctl_table trans_net_ipx_table[] = {
  393. { NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting" },
  394. /* NET_IPX_FORWARDING unused */
  395. {}
  396. };
  397. static struct trans_ctl_table trans_net_atalk_table[] = {
  398. { NET_ATALK_AARP_EXPIRY_TIME, "aarp-expiry-time" },
  399. { NET_ATALK_AARP_TICK_TIME, "aarp-tick-time" },
  400. { NET_ATALK_AARP_RETRANSMIT_LIMIT, "aarp-retransmit-limit" },
  401. { NET_ATALK_AARP_RESOLVE_TIME, "aarp-resolve-time" },
  402. {},
  403. };
  404. static struct trans_ctl_table trans_net_netrom_table[] = {
  405. { NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality" },
  406. { NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser" },
  407. { NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser" },
  408. { NET_NETROM_TRANSPORT_TIMEOUT, "transport_timeout" },
  409. { NET_NETROM_TRANSPORT_MAXIMUM_TRIES, "transport_maximum_tries" },
  410. { NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY, "transport_acknowledge_delay" },
  411. { NET_NETROM_TRANSPORT_BUSY_DELAY, "transport_busy_delay" },
  412. { NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE, "transport_requested_window_size" },
  413. { NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT, "transport_no_activity_timeout" },
  414. { NET_NETROM_ROUTING_CONTROL, "routing_control" },
  415. { NET_NETROM_LINK_FAILS_COUNT, "link_fails_count" },
  416. { NET_NETROM_RESET, "reset" },
  417. {}
  418. };
  419. static struct trans_ctl_table trans_net_ax25_table[] = {
  420. { NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" },
  421. { NET_AX25_DEFAULT_MODE, "ax25_default_mode" },
  422. { NET_AX25_BACKOFF_TYPE, "backoff_type" },
  423. { NET_AX25_CONNECT_MODE, "connect_mode" },
  424. { NET_AX25_STANDARD_WINDOW, "standard_window_size" },
  425. { NET_AX25_EXTENDED_WINDOW, "extended_window_size" },
  426. { NET_AX25_T1_TIMEOUT, "t1_timeout" },
  427. { NET_AX25_T2_TIMEOUT, "t2_timeout" },
  428. { NET_AX25_T3_TIMEOUT, "t3_timeout" },
  429. { NET_AX25_IDLE_TIMEOUT, "idle_timeout" },
  430. { NET_AX25_N2, "maximum_retry_count" },
  431. { NET_AX25_PACLEN, "maximum_packet_length" },
  432. { NET_AX25_PROTOCOL, "protocol" },
  433. { NET_AX25_DAMA_SLAVE_TIMEOUT, "dama_slave_timeout" },
  434. {}
  435. };
  436. static struct trans_ctl_table trans_net_bridge_table[] = {
  437. { NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" },
  438. { NET_BRIDGE_NF_CALL_IPTABLES, "bridge-nf-call-iptables" },
  439. { NET_BRIDGE_NF_CALL_IP6TABLES, "bridge-nf-call-ip6tables" },
  440. { NET_BRIDGE_NF_FILTER_VLAN_TAGGED, "bridge-nf-filter-vlan-tagged" },
  441. { NET_BRIDGE_NF_FILTER_PPPOE_TAGGED, "bridge-nf-filter-pppoe-tagged" },
  442. {}
  443. };
  444. static struct trans_ctl_table trans_net_rose_table[] = {
  445. { NET_ROSE_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" },
  446. { NET_ROSE_CALL_REQUEST_TIMEOUT, "call_request_timeout" },
  447. { NET_ROSE_RESET_REQUEST_TIMEOUT, "reset_request_timeout" },
  448. { NET_ROSE_CLEAR_REQUEST_TIMEOUT, "clear_request_timeout" },
  449. { NET_ROSE_ACK_HOLD_BACK_TIMEOUT, "acknowledge_hold_back_timeout" },
  450. { NET_ROSE_ROUTING_CONTROL, "routing_control" },
  451. { NET_ROSE_LINK_FAIL_TIMEOUT, "link_fail_timeout" },
  452. { NET_ROSE_MAX_VCS, "maximum_virtual_circuits" },
  453. { NET_ROSE_WINDOW_SIZE, "window_size" },
  454. { NET_ROSE_NO_ACTIVITY_TIMEOUT, "no_activity_timeout" },
  455. {}
  456. };
  457. static struct trans_ctl_table trans_net_ipv6_conf_var_table[] = {
  458. { NET_IPV6_FORWARDING, "forwarding" },
  459. { NET_IPV6_HOP_LIMIT, "hop_limit" },
  460. { NET_IPV6_MTU, "mtu" },
  461. { NET_IPV6_ACCEPT_RA, "accept_ra" },
  462. { NET_IPV6_ACCEPT_REDIRECTS, "accept_redirects" },
  463. { NET_IPV6_AUTOCONF, "autoconf" },
  464. { NET_IPV6_DAD_TRANSMITS, "dad_transmits" },
  465. { NET_IPV6_RTR_SOLICITS, "router_solicitations" },
  466. { NET_IPV6_RTR_SOLICIT_INTERVAL, "router_solicitation_interval" },
  467. { NET_IPV6_RTR_SOLICIT_DELAY, "router_solicitation_delay" },
  468. { NET_IPV6_USE_TEMPADDR, "use_tempaddr" },
  469. { NET_IPV6_TEMP_VALID_LFT, "temp_valid_lft" },
  470. { NET_IPV6_TEMP_PREFERED_LFT, "temp_prefered_lft" },
  471. { NET_IPV6_REGEN_MAX_RETRY, "regen_max_retry" },
  472. { NET_IPV6_MAX_DESYNC_FACTOR, "max_desync_factor" },
  473. { NET_IPV6_MAX_ADDRESSES, "max_addresses" },
  474. { NET_IPV6_FORCE_MLD_VERSION, "force_mld_version" },
  475. { NET_IPV6_ACCEPT_RA_DEFRTR, "accept_ra_defrtr" },
  476. { NET_IPV6_ACCEPT_RA_PINFO, "accept_ra_pinfo" },
  477. { NET_IPV6_ACCEPT_RA_RTR_PREF, "accept_ra_rtr_pref" },
  478. { NET_IPV6_RTR_PROBE_INTERVAL, "router_probe_interval" },
  479. { NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN, "accept_ra_rt_info_max_plen" },
  480. { NET_IPV6_PROXY_NDP, "proxy_ndp" },
  481. { NET_IPV6_ACCEPT_SOURCE_ROUTE, "accept_source_route" },
  482. {}
  483. };
  484. static struct trans_ctl_table trans_net_ipv6_conf_table[] = {
  485. { NET_PROTO_CONF_ALL, "all", trans_net_ipv6_conf_var_table },
  486. { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv6_conf_var_table },
  487. { 0, NULL, trans_net_ipv6_conf_var_table },
  488. {}
  489. };
  490. static struct trans_ctl_table trans_net_ipv6_route_table[] = {
  491. { NET_IPV6_ROUTE_FLUSH, "flush" },
  492. { NET_IPV6_ROUTE_GC_THRESH, "gc_thresh" },
  493. { NET_IPV6_ROUTE_MAX_SIZE, "max_size" },
  494. { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "gc_min_interval" },
  495. { NET_IPV6_ROUTE_GC_TIMEOUT, "gc_timeout" },
  496. { NET_IPV6_ROUTE_GC_INTERVAL, "gc_interval" },
  497. { NET_IPV6_ROUTE_GC_ELASTICITY, "gc_elasticity" },
  498. { NET_IPV6_ROUTE_MTU_EXPIRES, "mtu_expires" },
  499. { NET_IPV6_ROUTE_MIN_ADVMSS, "min_adv_mss" },
  500. { NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, "gc_min_interval_ms" },
  501. {}
  502. };
  503. static struct trans_ctl_table trans_net_ipv6_icmp_table[] = {
  504. { NET_IPV6_ICMP_RATELIMIT, "ratelimit" },
  505. {}
  506. };
  507. static struct trans_ctl_table trans_net_ipv6_table[] = {
  508. { NET_IPV6_CONF, "conf", trans_net_ipv6_conf_table },
  509. { NET_IPV6_NEIGH, "neigh", trans_net_neigh_table },
  510. { NET_IPV6_ROUTE, "route", trans_net_ipv6_route_table },
  511. { NET_IPV6_ICMP, "icmp", trans_net_ipv6_icmp_table },
  512. { NET_IPV6_BINDV6ONLY, "bindv6only" },
  513. { NET_IPV6_IP6FRAG_HIGH_THRESH, "ip6frag_high_thresh" },
  514. { NET_IPV6_IP6FRAG_LOW_THRESH, "ip6frag_low_thresh" },
  515. { NET_IPV6_IP6FRAG_TIME, "ip6frag_time" },
  516. { NET_IPV6_IP6FRAG_SECRET_INTERVAL, "ip6frag_secret_interval" },
  517. { NET_IPV6_MLD_MAX_MSF, "mld_max_msf" },
  518. { 2088 /* IPQ_QMAX */, "ip6_queue_maxlen" },
  519. {}
  520. };
  521. static struct trans_ctl_table trans_net_x25_table[] = {
  522. { NET_X25_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" },
  523. { NET_X25_CALL_REQUEST_TIMEOUT, "call_request_timeout" },
  524. { NET_X25_RESET_REQUEST_TIMEOUT, "reset_request_timeout" },
  525. { NET_X25_CLEAR_REQUEST_TIMEOUT, "clear_request_timeout" },
  526. { NET_X25_ACK_HOLD_BACK_TIMEOUT, "acknowledgement_hold_back_timeout" },
  527. { NET_X25_FORWARD, "x25_forward" },
  528. {}
  529. };
  530. static struct trans_ctl_table trans_net_tr_table[] = {
  531. { NET_TR_RIF_TIMEOUT, "rif_timeout" },
  532. {}
  533. };
  534. static struct trans_ctl_table trans_net_decnet_conf_vars[] = {
  535. { NET_DECNET_CONF_DEV_FORWARDING, "forwarding" },
  536. { NET_DECNET_CONF_DEV_PRIORITY, "priority" },
  537. { NET_DECNET_CONF_DEV_T2, "t2" },
  538. { NET_DECNET_CONF_DEV_T3, "t3" },
  539. {}
  540. };
  541. static struct trans_ctl_table trans_net_decnet_conf[] = {
  542. { 0, NULL, trans_net_decnet_conf_vars },
  543. {}
  544. };
  545. static struct trans_ctl_table trans_net_decnet_table[] = {
  546. { NET_DECNET_CONF, "conf", trans_net_decnet_conf },
  547. { NET_DECNET_NODE_ADDRESS, "node_address" },
  548. { NET_DECNET_NODE_NAME, "node_name" },
  549. { NET_DECNET_DEFAULT_DEVICE, "default_device" },
  550. { NET_DECNET_TIME_WAIT, "time_wait" },
  551. { NET_DECNET_DN_COUNT, "dn_count" },
  552. { NET_DECNET_DI_COUNT, "di_count" },
  553. { NET_DECNET_DR_COUNT, "dr_count" },
  554. { NET_DECNET_DST_GC_INTERVAL, "dst_gc_interval" },
  555. { NET_DECNET_NO_FC_MAX_CWND, "no_fc_max_cwnd" },
  556. { NET_DECNET_MEM, "decnet_mem" },
  557. { NET_DECNET_RMEM, "decnet_rmem" },
  558. { NET_DECNET_WMEM, "decnet_wmem" },
  559. { NET_DECNET_DEBUG_LEVEL, "debug" },
  560. {}
  561. };
  562. static struct trans_ctl_table trans_net_sctp_table[] = {
  563. { NET_SCTP_RTO_INITIAL, "rto_initial" },
  564. { NET_SCTP_RTO_MIN, "rto_min" },
  565. { NET_SCTP_RTO_MAX, "rto_max" },
  566. { NET_SCTP_RTO_ALPHA, "rto_alpha_exp_divisor" },
  567. { NET_SCTP_RTO_BETA, "rto_beta_exp_divisor" },
  568. { NET_SCTP_VALID_COOKIE_LIFE, "valid_cookie_life" },
  569. { NET_SCTP_ASSOCIATION_MAX_RETRANS, "association_max_retrans" },
  570. { NET_SCTP_PATH_MAX_RETRANS, "path_max_retrans" },
  571. { NET_SCTP_MAX_INIT_RETRANSMITS, "max_init_retransmits" },
  572. { NET_SCTP_HB_INTERVAL, "hb_interval" },
  573. { NET_SCTP_PRESERVE_ENABLE, "cookie_preserve_enable" },
  574. { NET_SCTP_MAX_BURST, "max_burst" },
  575. { NET_SCTP_ADDIP_ENABLE, "addip_enable" },
  576. { NET_SCTP_PRSCTP_ENABLE, "prsctp_enable" },
  577. { NET_SCTP_SNDBUF_POLICY, "sndbuf_policy" },
  578. { NET_SCTP_SACK_TIMEOUT, "sack_timeout" },
  579. { NET_SCTP_RCVBUF_POLICY, "rcvbuf_policy" },
  580. {}
  581. };
  582. static struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = {
  583. { NET_LLC2_ACK_TIMEOUT, "ack" },
  584. { NET_LLC2_P_TIMEOUT, "p" },
  585. { NET_LLC2_REJ_TIMEOUT, "rej" },
  586. { NET_LLC2_BUSY_TIMEOUT, "busy" },
  587. {}
  588. };
  589. static struct trans_ctl_table trans_net_llc_station_table[] = {
  590. { NET_LLC_STATION_ACK_TIMEOUT, "ack_timeout" },
  591. {}
  592. };
  593. static struct trans_ctl_table trans_net_llc_llc2_table[] = {
  594. { NET_LLC2, "timeout", trans_net_llc_llc2_timeout_table },
  595. {}
  596. };
  597. static struct trans_ctl_table trans_net_llc_table[] = {
  598. { NET_LLC2, "llc2", trans_net_llc_llc2_table },
  599. { NET_LLC_STATION, "station", trans_net_llc_station_table },
  600. {}
  601. };
  602. static struct trans_ctl_table trans_net_netfilter_table[] = {
  603. { NET_NF_CONNTRACK_MAX, "nf_conntrack_max" },
  604. { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "nf_conntrack_tcp_timeout_syn_sent" },
  605. { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV, "nf_conntrack_tcp_timeout_syn_recv" },
  606. { NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED, "nf_conntrack_tcp_timeout_established" },
  607. { NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT, "nf_conntrack_tcp_timeout_fin_wait" },
  608. { NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT, "nf_conntrack_tcp_timeout_close_wait" },
  609. { NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK, "nf_conntrack_tcp_timeout_last_ack" },
  610. { NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT, "nf_conntrack_tcp_timeout_time_wait" },
  611. { NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE, "nf_conntrack_tcp_timeout_close" },
  612. { NET_NF_CONNTRACK_UDP_TIMEOUT, "nf_conntrack_udp_timeout" },
  613. { NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM, "nf_conntrack_udp_timeout_stream" },
  614. { NET_NF_CONNTRACK_ICMP_TIMEOUT, "nf_conntrack_icmp_timeout" },
  615. { NET_NF_CONNTRACK_GENERIC_TIMEOUT, "nf_conntrack_generic_timeout" },
  616. { NET_NF_CONNTRACK_BUCKETS, "nf_conntrack_buckets" },
  617. { NET_NF_CONNTRACK_LOG_INVALID, "nf_conntrack_log_invalid" },
  618. { NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS, "nf_conntrack_tcp_timeout_max_retrans" },
  619. { NET_NF_CONNTRACK_TCP_LOOSE, "nf_conntrack_tcp_loose" },
  620. { NET_NF_CONNTRACK_TCP_BE_LIBERAL, "nf_conntrack_tcp_be_liberal" },
  621. { NET_NF_CONNTRACK_TCP_MAX_RETRANS, "nf_conntrack_tcp_max_retrans" },
  622. { NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED, "nf_conntrack_sctp_timeout_closed" },
  623. { NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT, "nf_conntrack_sctp_timeout_cookie_wait" },
  624. { NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED, "nf_conntrack_sctp_timeout_cookie_echoed" },
  625. { NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED, "nf_conntrack_sctp_timeout_established" },
  626. { NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT, "nf_conntrack_sctp_timeout_shutdown_sent" },
  627. { NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD, "nf_conntrack_sctp_timeout_shutdown_recd" },
  628. { NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT, "nf_conntrack_sctp_timeout_shutdown_ack_sent" },
  629. { NET_NF_CONNTRACK_COUNT, "nf_conntrack_count" },
  630. { NET_NF_CONNTRACK_ICMPV6_TIMEOUT, "nf_conntrack_icmpv6_timeout" },
  631. { NET_NF_CONNTRACK_FRAG6_TIMEOUT, "nf_conntrack_frag6_timeout" },
  632. { NET_NF_CONNTRACK_FRAG6_LOW_THRESH, "nf_conntrack_frag6_low_thresh" },
  633. { NET_NF_CONNTRACK_FRAG6_HIGH_THRESH, "nf_conntrack_frag6_high_thresh" },
  634. { NET_NF_CONNTRACK_CHECKSUM, "nf_conntrack_checksum" },
  635. {}
  636. };
  637. static struct trans_ctl_table trans_net_dccp_table[] = {
  638. { NET_DCCP_DEFAULT, "default" },
  639. {}
  640. };
  641. static struct trans_ctl_table trans_net_irda_table[] = {
  642. { NET_IRDA_DISCOVERY, "discovery" },
  643. { NET_IRDA_DEVNAME, "devname" },
  644. { NET_IRDA_DEBUG, "debug" },
  645. { NET_IRDA_FAST_POLL, "fast_poll_increase" },
  646. { NET_IRDA_DISCOVERY_SLOTS, "discovery_slots" },
  647. { NET_IRDA_DISCOVERY_TIMEOUT, "discovery_timeout" },
  648. { NET_IRDA_SLOT_TIMEOUT, "slot_timeout" },
  649. { NET_IRDA_MAX_BAUD_RATE, "max_baud_rate" },
  650. { NET_IRDA_MIN_TX_TURN_TIME, "min_tx_turn_time" },
  651. { NET_IRDA_MAX_TX_DATA_SIZE, "max_tx_data_size" },
  652. { NET_IRDA_MAX_TX_WINDOW, "max_tx_window" },
  653. { NET_IRDA_MAX_NOREPLY_TIME, "max_noreply_time" },
  654. { NET_IRDA_WARN_NOREPLY_TIME, "warn_noreply_time" },
  655. { NET_IRDA_LAP_KEEPALIVE_TIME, "lap_keepalive_time" },
  656. {}
  657. };
  658. static struct trans_ctl_table trans_net_table[] = {
  659. { NET_CORE, "core", trans_net_core_table },
  660. /* NET_ETHER not used */
  661. /* NET_802 not used */
  662. { NET_UNIX, "unix", trans_net_unix_table },
  663. { NET_IPV4, "ipv4", trans_net_ipv4_table },
  664. { NET_IPX, "ipx", trans_net_ipx_table },
  665. { NET_ATALK, "appletalk", trans_net_atalk_table },
  666. { NET_NETROM, "netrom", trans_net_netrom_table },
  667. { NET_AX25, "ax25", trans_net_ax25_table },
  668. { NET_BRIDGE, "bridge", trans_net_bridge_table },
  669. { NET_ROSE, "rose", trans_net_rose_table },
  670. { NET_IPV6, "ipv6", trans_net_ipv6_table },
  671. { NET_X25, "x25", trans_net_x25_table },
  672. { NET_TR, "token-ring", trans_net_tr_table },
  673. { NET_DECNET, "decnet", trans_net_decnet_table },
  674. /* NET_ECONET not used */
  675. { NET_SCTP, "sctp", trans_net_sctp_table },
  676. { NET_LLC, "llc", trans_net_llc_table },
  677. { NET_NETFILTER, "netfilter", trans_net_netfilter_table },
  678. { NET_DCCP, "dccp", trans_net_dccp_table },
  679. { NET_IRDA, "irda", trans_net_irda_table },
  680. { 2089, "nf_conntrack_max" },
  681. {}
  682. };
  683. static struct trans_ctl_table trans_fs_quota_table[] = {
  684. { FS_DQ_LOOKUPS, "lookups" },
  685. { FS_DQ_DROPS, "drops" },
  686. { FS_DQ_READS, "reads" },
  687. { FS_DQ_WRITES, "writes" },
  688. { FS_DQ_CACHE_HITS, "cache_hits" },
  689. { FS_DQ_ALLOCATED, "allocated_dquots" },
  690. { FS_DQ_FREE, "free_dquots" },
  691. { FS_DQ_SYNCS, "syncs" },
  692. { FS_DQ_WARNINGS, "warnings" },
  693. {}
  694. };
  695. static struct trans_ctl_table trans_fs_xfs_table[] = {
  696. { XFS_RESTRICT_CHOWN, "restrict_chown" },
  697. { XFS_SGID_INHERIT, "irix_sgid_inherit" },
  698. { XFS_SYMLINK_MODE, "irix_symlink_mode" },
  699. { XFS_PANIC_MASK, "panic_mask" },
  700. { XFS_ERRLEVEL, "error_level" },
  701. { XFS_SYNCD_TIMER, "xfssyncd_centisecs" },
  702. { XFS_INHERIT_SYNC, "inherit_sync" },
  703. { XFS_INHERIT_NODUMP, "inherit_nodump" },
  704. { XFS_INHERIT_NOATIME, "inherit_noatime" },
  705. { XFS_BUF_TIMER, "xfsbufd_centisecs" },
  706. { XFS_BUF_AGE, "age_buffer_centisecs" },
  707. { XFS_INHERIT_NOSYM, "inherit_nosymlinks" },
  708. { XFS_ROTORSTEP, "rotorstep" },
  709. { XFS_INHERIT_NODFRG, "inherit_nodefrag" },
  710. { XFS_FILESTREAM_TIMER, "filestream_centisecs" },
  711. { XFS_STATS_CLEAR, "stats_clear" },
  712. {}
  713. };
  714. static struct trans_ctl_table trans_fs_ocfs2_nm_table[] = {
  715. { 1, "hb_ctl_path" },
  716. {}
  717. };
  718. static struct trans_ctl_table trans_fs_ocfs2_table[] = {
  719. { 1, "nm", trans_fs_ocfs2_nm_table },
  720. {}
  721. };
  722. static struct trans_ctl_table trans_inotify_table[] = {
  723. { INOTIFY_MAX_USER_INSTANCES, "max_user_instances" },
  724. { INOTIFY_MAX_USER_WATCHES, "max_user_watches" },
  725. { INOTIFY_MAX_QUEUED_EVENTS, "max_queued_events" },
  726. {}
  727. };
  728. static struct trans_ctl_table trans_fs_table[] = {
  729. { FS_NRINODE, "inode-nr" },
  730. { FS_STATINODE, "inode-state" },
  731. /* FS_MAXINODE unused */
  732. /* FS_NRDQUOT unused */
  733. /* FS_MAXDQUOT unused */
  734. { FS_NRFILE, "file-nr" },
  735. { FS_MAXFILE, "file-max" },
  736. { FS_DENTRY, "dentry-state" },
  737. /* FS_NRSUPER unused */
  738. /* FS_MAXUPSER unused */
  739. { FS_OVERFLOWUID, "overflowuid" },
  740. { FS_OVERFLOWGID, "overflowgid" },
  741. { FS_LEASES, "leases-enable" },
  742. { FS_DIR_NOTIFY, "dir-notify-enable" },
  743. { FS_LEASE_TIME, "lease-break-time" },
  744. { FS_DQSTATS, "quota", trans_fs_quota_table },
  745. { FS_XFS, "xfs", trans_fs_xfs_table },
  746. { FS_AIO_NR, "aio-nr" },
  747. { FS_AIO_MAX_NR, "aio-max-nr" },
  748. { FS_INOTIFY, "inotify", trans_inotify_table },
  749. { FS_OCFS2, "ocfs2", trans_fs_ocfs2_table },
  750. { KERN_SETUID_DUMPABLE, "suid_dumpable" },
  751. {}
  752. };
  753. static struct trans_ctl_table trans_debug_table[] = {
  754. {}
  755. };
  756. static struct trans_ctl_table trans_cdrom_table[] = {
  757. { DEV_CDROM_INFO, "info" },
  758. { DEV_CDROM_AUTOCLOSE, "autoclose" },
  759. { DEV_CDROM_AUTOEJECT, "autoeject" },
  760. { DEV_CDROM_DEBUG, "debug" },
  761. { DEV_CDROM_LOCK, "lock" },
  762. { DEV_CDROM_CHECK_MEDIA, "check_media" },
  763. {}
  764. };
  765. static struct trans_ctl_table trans_ipmi_table[] = {
  766. { DEV_IPMI_POWEROFF_POWERCYCLE, "poweroff_powercycle" },
  767. {}
  768. };
  769. static struct trans_ctl_table trans_mac_hid_files[] = {
  770. /* DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES unused */
  771. /* DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES unused */
  772. { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation" },
  773. { DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE, "mouse_button2_keycode" },
  774. { DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE, "mouse_button3_keycode" },
  775. /* DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES unused */
  776. {}
  777. };
  778. static struct trans_ctl_table trans_raid_table[] = {
  779. { DEV_RAID_SPEED_LIMIT_MIN, "speed_limit_min" },
  780. { DEV_RAID_SPEED_LIMIT_MAX, "speed_limit_max" },
  781. {}
  782. };
  783. static struct trans_ctl_table trans_scsi_table[] = {
  784. { DEV_SCSI_LOGGING_LEVEL, "logging_level" },
  785. {}
  786. };
  787. static struct trans_ctl_table trans_parport_default_table[] = {
  788. { DEV_PARPORT_DEFAULT_TIMESLICE, "timeslice" },
  789. { DEV_PARPORT_DEFAULT_SPINTIME, "spintime" },
  790. {}
  791. };
  792. static struct trans_ctl_table trans_parport_device_table[] = {
  793. { DEV_PARPORT_DEVICE_TIMESLICE, "timeslice" },
  794. {}
  795. };
  796. static struct trans_ctl_table trans_parport_devices_table[] = {
  797. { DEV_PARPORT_DEVICES_ACTIVE, "active" },
  798. { 0, NULL, trans_parport_device_table },
  799. {}
  800. };
  801. static struct trans_ctl_table trans_parport_parport_table[] = {
  802. { DEV_PARPORT_SPINTIME, "spintime" },
  803. { DEV_PARPORT_BASE_ADDR, "base-addr" },
  804. { DEV_PARPORT_IRQ, "irq" },
  805. { DEV_PARPORT_DMA, "dma" },
  806. { DEV_PARPORT_MODES, "modes" },
  807. { DEV_PARPORT_DEVICES, "devices", trans_parport_devices_table },
  808. { DEV_PARPORT_AUTOPROBE, "autoprobe" },
  809. { DEV_PARPORT_AUTOPROBE + 1, "autoprobe0" },
  810. { DEV_PARPORT_AUTOPROBE + 2, "autoprobe1" },
  811. { DEV_PARPORT_AUTOPROBE + 3, "autoprobe2" },
  812. { DEV_PARPORT_AUTOPROBE + 4, "autoprobe3" },
  813. {}
  814. };
  815. static struct trans_ctl_table trans_parport_table[] = {
  816. { DEV_PARPORT_DEFAULT, "default", trans_parport_default_table },
  817. { 0, NULL, trans_parport_parport_table },
  818. {}
  819. };
  820. static struct trans_ctl_table trans_dev_table[] = {
  821. { DEV_CDROM, "cdrom", trans_cdrom_table },
  822. /* DEV_HWMON unused */
  823. { DEV_PARPORT, "parport", trans_parport_table },
  824. { DEV_RAID, "raid", trans_raid_table },
  825. { DEV_MAC_HID, "mac_hid", trans_mac_hid_files },
  826. { DEV_SCSI, "scsi", trans_scsi_table },
  827. { DEV_IPMI, "ipmi", trans_ipmi_table },
  828. {}
  829. };
  830. static struct trans_ctl_table trans_bus_isa_table[] = {
  831. { BUS_ISA_MEM_BASE, "membase" },
  832. { BUS_ISA_PORT_BASE, "portbase" },
  833. { BUS_ISA_PORT_SHIFT, "portshift" },
  834. {}
  835. };
  836. static struct trans_ctl_table trans_bus_table[] = {
  837. { CTL_BUS_ISA, "isa", trans_bus_isa_table },
  838. {}
  839. };
  840. static struct trans_ctl_table trans_arlan_conf_table0[] = {
  841. { 1, "spreadingCode" },
  842. { 2, "channelNumber" },
  843. { 3, "scramblingDisable" },
  844. { 4, "txAttenuation" },
  845. { 5, "systemId" },
  846. { 6, "maxDatagramSize" },
  847. { 7, "maxFrameSize" },
  848. { 8, "maxRetries" },
  849. { 9, "receiveMode" },
  850. { 10, "priority" },
  851. { 11, "rootOrRepeater" },
  852. { 12, "SID" },
  853. { 13, "registrationMode" },
  854. { 14, "registrationFill" },
  855. { 15, "localTalkAddress" },
  856. { 16, "codeFormat" },
  857. { 17, "numChannels" },
  858. { 18, "channel1" },
  859. { 19, "channel2" },
  860. { 20, "channel3" },
  861. { 21, "channel4" },
  862. { 22, "txClear" },
  863. { 23, "txRetries" },
  864. { 24, "txRouting" },
  865. { 25, "txScrambled" },
  866. { 26, "rxParameter" },
  867. { 27, "txTimeoutMs" },
  868. { 28, "waitCardTimeout" },
  869. { 29, "channelSet" },
  870. { 30, "name" },
  871. { 31, "waitTime" },
  872. { 32, "lParameter" },
  873. { 33, "_15" },
  874. { 34, "headerSize" },
  875. { 36, "tx_delay_ms" },
  876. { 37, "retries" },
  877. { 38, "ReTransmitPacketMaxSize" },
  878. { 39, "waitReTransmitPacketMaxSize" },
  879. { 40, "fastReTransCount" },
  880. { 41, "driverRetransmissions" },
  881. { 42, "txAckTimeoutMs" },
  882. { 43, "registrationInterrupts" },
  883. { 44, "hardwareType" },
  884. { 45, "radioType" },
  885. { 46, "writeEEPROM" },
  886. { 47, "writeRadioType" },
  887. { 48, "entry_exit_debug" },
  888. { 49, "debug" },
  889. { 50, "in_speed" },
  890. { 51, "out_speed" },
  891. { 52, "in_speed10" },
  892. { 53, "out_speed10" },
  893. { 54, "in_speed_max" },
  894. { 55, "out_speed_max" },
  895. { 56, "measure_rate" },
  896. { 57, "pre_Command_Wait" },
  897. { 58, "rx_tweak1" },
  898. { 59, "rx_tweak2" },
  899. { 60, "tx_queue_len" },
  900. { 150, "arlan0-txRing" },
  901. { 151, "arlan0-rxRing" },
  902. { 152, "arlan0-18" },
  903. { 153, "arlan0-ring" },
  904. { 154, "arlan0-shm-cpy" },
  905. { 155, "config0" },
  906. { 156, "reset0" },
  907. {}
  908. };
  909. static struct trans_ctl_table trans_arlan_conf_table1[] = {
  910. { 1, "spreadingCode" },
  911. { 2, "channelNumber" },
  912. { 3, "scramblingDisable" },
  913. { 4, "txAttenuation" },
  914. { 5, "systemId" },
  915. { 6, "maxDatagramSize" },
  916. { 7, "maxFrameSize" },
  917. { 8, "maxRetries" },
  918. { 9, "receiveMode" },
  919. { 10, "priority" },
  920. { 11, "rootOrRepeater" },
  921. { 12, "SID" },
  922. { 13, "registrationMode" },
  923. { 14, "registrationFill" },
  924. { 15, "localTalkAddress" },
  925. { 16, "codeFormat" },
  926. { 17, "numChannels" },
  927. { 18, "channel1" },
  928. { 19, "channel2" },
  929. { 20, "channel3" },
  930. { 21, "channel4" },
  931. { 22, "txClear" },
  932. { 23, "txRetries" },
  933. { 24, "txRouting" },
  934. { 25, "txScrambled" },
  935. { 26, "rxParameter" },
  936. { 27, "txTimeoutMs" },
  937. { 28, "waitCardTimeout" },
  938. { 29, "channelSet" },
  939. { 30, "name" },
  940. { 31, "waitTime" },
  941. { 32, "lParameter" },
  942. { 33, "_15" },
  943. { 34, "headerSize" },
  944. { 36, "tx_delay_ms" },
  945. { 37, "retries" },
  946. { 38, "ReTransmitPacketMaxSize" },
  947. { 39, "waitReTransmitPacketMaxSize" },
  948. { 40, "fastReTransCount" },
  949. { 41, "driverRetransmissions" },
  950. { 42, "txAckTimeoutMs" },
  951. { 43, "registrationInterrupts" },
  952. { 44, "hardwareType" },
  953. { 45, "radioType" },
  954. { 46, "writeEEPROM" },
  955. { 47, "writeRadioType" },
  956. { 48, "entry_exit_debug" },
  957. { 49, "debug" },
  958. { 50, "in_speed" },
  959. { 51, "out_speed" },
  960. { 52, "in_speed10" },
  961. { 53, "out_speed10" },
  962. { 54, "in_speed_max" },
  963. { 55, "out_speed_max" },
  964. { 56, "measure_rate" },
  965. { 57, "pre_Command_Wait" },
  966. { 58, "rx_tweak1" },
  967. { 59, "rx_tweak2" },
  968. { 60, "tx_queue_len" },
  969. { 150, "arlan1-txRing" },
  970. { 151, "arlan1-rxRing" },
  971. { 152, "arlan1-18" },
  972. { 153, "arlan1-ring" },
  973. { 154, "arlan1-shm-cpy" },
  974. { 155, "config1" },
  975. { 156, "reset1" },
  976. {}
  977. };
  978. static struct trans_ctl_table trans_arlan_conf_table2[] = {
  979. { 1, "spreadingCode" },
  980. { 2, "channelNumber" },
  981. { 3, "scramblingDisable" },
  982. { 4, "txAttenuation" },
  983. { 5, "systemId" },
  984. { 6, "maxDatagramSize" },
  985. { 7, "maxFrameSize" },
  986. { 8, "maxRetries" },
  987. { 9, "receiveMode" },
  988. { 10, "priority" },
  989. { 11, "rootOrRepeater" },
  990. { 12, "SID" },
  991. { 13, "registrationMode" },
  992. { 14, "registrationFill" },
  993. { 15, "localTalkAddress" },
  994. { 16, "codeFormat" },
  995. { 17, "numChannels" },
  996. { 18, "channel1" },
  997. { 19, "channel2" },
  998. { 20, "channel3" },
  999. { 21, "channel4" },
  1000. { 22, "txClear" },
  1001. { 23, "txRetries" },
  1002. { 24, "txRouting" },
  1003. { 25, "txScrambled" },
  1004. { 26, "rxParameter" },
  1005. { 27, "txTimeoutMs" },
  1006. { 28, "waitCardTimeout" },
  1007. { 29, "channelSet" },
  1008. { 30, "name" },
  1009. { 31, "waitTime" },
  1010. { 32, "lParameter" },
  1011. { 33, "_15" },
  1012. { 34, "headerSize" },
  1013. { 36, "tx_delay_ms" },
  1014. { 37, "retries" },
  1015. { 38, "ReTransmitPacketMaxSize" },
  1016. { 39, "waitReTransmitPacketMaxSize" },
  1017. { 40, "fastReTransCount" },
  1018. { 41, "driverRetransmissions" },
  1019. { 42, "txAckTimeoutMs" },
  1020. { 43, "registrationInterrupts" },
  1021. { 44, "hardwareType" },
  1022. { 45, "radioType" },
  1023. { 46, "writeEEPROM" },
  1024. { 47, "writeRadioType" },
  1025. { 48, "entry_exit_debug" },
  1026. { 49, "debug" },
  1027. { 50, "in_speed" },
  1028. { 51, "out_speed" },
  1029. { 52, "in_speed10" },
  1030. { 53, "out_speed10" },
  1031. { 54, "in_speed_max" },
  1032. { 55, "out_speed_max" },
  1033. { 56, "measure_rate" },
  1034. { 57, "pre_Command_Wait" },
  1035. { 58, "rx_tweak1" },
  1036. { 59, "rx_tweak2" },
  1037. { 60, "tx_queue_len" },
  1038. { 150, "arlan2-txRing" },
  1039. { 151, "arlan2-rxRing" },
  1040. { 152, "arlan2-18" },
  1041. { 153, "arlan2-ring" },
  1042. { 154, "arlan2-shm-cpy" },
  1043. { 155, "config2" },
  1044. { 156, "reset2" },
  1045. {}
  1046. };
  1047. static struct trans_ctl_table trans_arlan_conf_table3[] = {
  1048. { 1, "spreadingCode" },
  1049. { 2, "channelNumber" },
  1050. { 3, "scramblingDisable" },
  1051. { 4, "txAttenuation" },
  1052. { 5, "systemId" },
  1053. { 6, "maxDatagramSize" },
  1054. { 7, "maxFrameSize" },
  1055. { 8, "maxRetries" },
  1056. { 9, "receiveMode" },
  1057. { 10, "priority" },
  1058. { 11, "rootOrRepeater" },
  1059. { 12, "SID" },
  1060. { 13, "registrationMode" },
  1061. { 14, "registrationFill" },
  1062. { 15, "localTalkAddress" },
  1063. { 16, "codeFormat" },
  1064. { 17, "numChannels" },
  1065. { 18, "channel1" },
  1066. { 19, "channel2" },
  1067. { 20, "channel3" },
  1068. { 21, "channel4" },
  1069. { 22, "txClear" },
  1070. { 23, "txRetries" },
  1071. { 24, "txRouting" },
  1072. { 25, "txScrambled" },
  1073. { 26, "rxParameter" },
  1074. { 27, "txTimeoutMs" },
  1075. { 28, "waitCardTimeout" },
  1076. { 29, "channelSet" },
  1077. { 30, "name" },
  1078. { 31, "waitTime" },
  1079. { 32, "lParameter" },
  1080. { 33, "_15" },
  1081. { 34, "headerSize" },
  1082. { 36, "tx_delay_ms" },
  1083. { 37, "retries" },
  1084. { 38, "ReTransmitPacketMaxSize" },
  1085. { 39, "waitReTransmitPacketMaxSize" },
  1086. { 40, "fastReTransCount" },
  1087. { 41, "driverRetransmissions" },
  1088. { 42, "txAckTimeoutMs" },
  1089. { 43, "registrationInterrupts" },
  1090. { 44, "hardwareType" },
  1091. { 45, "radioType" },
  1092. { 46, "writeEEPROM" },
  1093. { 47, "writeRadioType" },
  1094. { 48, "entry_exit_debug" },
  1095. { 49, "debug" },
  1096. { 50, "in_speed" },
  1097. { 51, "out_speed" },
  1098. { 52, "in_speed10" },
  1099. { 53, "out_speed10" },
  1100. { 54, "in_speed_max" },
  1101. { 55, "out_speed_max" },
  1102. { 56, "measure_rate" },
  1103. { 57, "pre_Command_Wait" },
  1104. { 58, "rx_tweak1" },
  1105. { 59, "rx_tweak2" },
  1106. { 60, "tx_queue_len" },
  1107. { 150, "arlan3-txRing" },
  1108. { 151, "arlan3-rxRing" },
  1109. { 152, "arlan3-18" },
  1110. { 153, "arlan3-ring" },
  1111. { 154, "arlan3-shm-cpy" },
  1112. { 155, "config3" },
  1113. { 156, "reset3" },
  1114. {}
  1115. };
  1116. static struct trans_ctl_table trans_arlan_table[] = {
  1117. { 1, "arlan0", trans_arlan_conf_table0 },
  1118. { 2, "arlan1", trans_arlan_conf_table1 },
  1119. { 3, "arlan2", trans_arlan_conf_table2 },
  1120. { 4, "arlan3", trans_arlan_conf_table3 },
  1121. {}
  1122. };
  1123. static struct trans_ctl_table trans_s390dbf_table[] = {
  1124. { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" },
  1125. { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" },
  1126. {}
  1127. };
  1128. static struct trans_ctl_table trans_sunrpc_table[] = {
  1129. { CTL_RPCDEBUG, "rpc_debug" },
  1130. { CTL_NFSDEBUG, "nfs_debug" },
  1131. { CTL_NFSDDEBUG, "nfsd_debug" },
  1132. { CTL_NLMDEBUG, "nlm_debug" },
  1133. { CTL_SLOTTABLE_UDP, "udp_slot_table_entries" },
  1134. { CTL_SLOTTABLE_TCP, "tcp_slot_table_entries" },
  1135. { CTL_MIN_RESVPORT, "min_resvport" },
  1136. { CTL_MAX_RESVPORT, "max_resvport" },
  1137. {}
  1138. };
  1139. static struct trans_ctl_table trans_pm_table[] = {
  1140. { 1 /* CTL_PM_SUSPEND */, "suspend" },
  1141. { 2 /* CTL_PM_CMODE */, "cmode" },
  1142. { 3 /* CTL_PM_P0 */, "p0" },
  1143. { 4 /* CTL_PM_CM */, "cm" },
  1144. {}
  1145. };
  1146. static struct trans_ctl_table trans_frv_table[] = {
  1147. { 1, "cache-mode" },
  1148. { 2, "pin-cxnr" },
  1149. {}
  1150. };
  1151. static struct trans_ctl_table trans_root_table[] = {
  1152. { CTL_KERN, "kernel", trans_kern_table },
  1153. { CTL_VM, "vm", trans_vm_table },
  1154. { CTL_NET, "net", trans_net_table },
  1155. /* CTL_PROC not used */
  1156. { CTL_FS, "fs", trans_fs_table },
  1157. { CTL_DEBUG, "debug", trans_debug_table },
  1158. { CTL_DEV, "dev", trans_dev_table },
  1159. { CTL_BUS, "bus", trans_bus_table },
  1160. { CTL_ABI, "abi" },
  1161. /* CTL_CPU not used */
  1162. { CTL_ARLAN, "arlan", trans_arlan_table },
  1163. { CTL_S390DBF, "s390dbf", trans_s390dbf_table },
  1164. { CTL_SUNRPC, "sunrpc", trans_sunrpc_table },
  1165. { CTL_PM, "pm", trans_pm_table },
  1166. { CTL_FRV, "frv", trans_frv_table },
  1167. {}
  1168. };
  1169. static int sysctl_depth(struct ctl_table *table)
  1170. {
  1171. struct ctl_table *tmp;
  1172. int depth;
  1173. depth = 0;
  1174. for (tmp = table; tmp->parent; tmp = tmp->parent)
  1175. depth++;
  1176. return depth;
  1177. }
  1178. static struct ctl_table *sysctl_parent(struct ctl_table *table, int n)
  1179. {
  1180. int i;
  1181. for (i = 0; table && i < n; i++)
  1182. table = table->parent;
  1183. return table;
  1184. }
  1185. static struct trans_ctl_table *sysctl_binary_lookup(struct ctl_table *table)
  1186. {
  1187. struct ctl_table *test;
  1188. struct trans_ctl_table *ref;
  1189. int depth, cur_depth;
  1190. depth = sysctl_depth(table);
  1191. cur_depth = depth;
  1192. ref = trans_root_table;
  1193. repeat:
  1194. test = sysctl_parent(table, cur_depth);
  1195. for (; ref->ctl_name || ref->procname || ref->child; ref++) {
  1196. int match = 0;
  1197. if (cur_depth && !ref->child)
  1198. continue;
  1199. if (test->procname && ref->procname &&
  1200. (strcmp(test->procname, ref->procname) == 0))
  1201. match++;
  1202. if (test->ctl_name && ref->ctl_name &&
  1203. (test->ctl_name == ref->ctl_name))
  1204. match++;
  1205. if (!ref->ctl_name && !ref->procname)
  1206. match++;
  1207. if (match) {
  1208. if (cur_depth != 0) {
  1209. cur_depth--;
  1210. ref = ref->child;
  1211. goto repeat;
  1212. }
  1213. goto out;
  1214. }
  1215. }
  1216. ref = NULL;
  1217. out:
  1218. return ref;
  1219. }
  1220. static void sysctl_print_path(struct ctl_table *table)
  1221. {
  1222. struct ctl_table *tmp;
  1223. int depth, i;
  1224. depth = sysctl_depth(table);
  1225. if (table->procname) {
  1226. for (i = depth; i >= 0; i--) {
  1227. tmp = sysctl_parent(table, i);
  1228. printk("/%s", tmp->procname?tmp->procname:"");
  1229. }
  1230. }
  1231. printk(" ");
  1232. if (table->ctl_name) {
  1233. for (i = depth; i >= 0; i--) {
  1234. tmp = sysctl_parent(table, i);
  1235. printk(".%d", tmp->ctl_name);
  1236. }
  1237. }
  1238. }
  1239. static void sysctl_repair_table(struct ctl_table *table)
  1240. {
  1241. /* Don't complain about the classic default
  1242. * sysctl strategy routine. Maybe later we
  1243. * can get the tables fixed and complain about
  1244. * this.
  1245. */
  1246. if (table->ctl_name && table->procname &&
  1247. (table->proc_handler == proc_dointvec) &&
  1248. (!table->strategy)) {
  1249. table->strategy = sysctl_data;
  1250. }
  1251. }
  1252. static struct ctl_table *sysctl_check_lookup(struct ctl_table *table)
  1253. {
  1254. struct ctl_table_header *head;
  1255. struct ctl_table *ref, *test;
  1256. int depth, cur_depth;
  1257. depth = sysctl_depth(table);
  1258. for (head = sysctl_head_next(NULL); head;
  1259. head = sysctl_head_next(head)) {
  1260. cur_depth = depth;
  1261. ref = head->ctl_table;
  1262. repeat:
  1263. test = sysctl_parent(table, cur_depth);
  1264. for (; ref->ctl_name || ref->procname; ref++) {
  1265. int match = 0;
  1266. if (cur_depth && !ref->child)
  1267. continue;
  1268. if (test->procname && ref->procname &&
  1269. (strcmp(test->procname, ref->procname) == 0))
  1270. match++;
  1271. if (test->ctl_name && ref->ctl_name &&
  1272. (test->ctl_name == ref->ctl_name))
  1273. match++;
  1274. if (match) {
  1275. if (cur_depth != 0) {
  1276. cur_depth--;
  1277. ref = ref->child;
  1278. goto repeat;
  1279. }
  1280. goto out;
  1281. }
  1282. }
  1283. }
  1284. ref = NULL;
  1285. out:
  1286. sysctl_head_finish(head);
  1287. return ref;
  1288. }
  1289. static void set_fail(const char **fail, struct ctl_table *table, const char *str)
  1290. {
  1291. if (*fail) {
  1292. printk(KERN_ERR "sysctl table check failed: ");
  1293. sysctl_print_path(table);
  1294. printk(" %s\n", *fail);
  1295. dump_stack();
  1296. }
  1297. *fail = str;
  1298. }
  1299. static int sysctl_check_dir(struct ctl_table *table)
  1300. {
  1301. struct ctl_table *ref;
  1302. int error;
  1303. error = 0;
  1304. ref = sysctl_check_lookup(table);
  1305. if (ref) {
  1306. int match = 0;
  1307. if ((!table->procname && !ref->procname) ||
  1308. (table->procname && ref->procname &&
  1309. (strcmp(table->procname, ref->procname) == 0)))
  1310. match++;
  1311. if ((!table->ctl_name && !ref->ctl_name) ||
  1312. (table->ctl_name && ref->ctl_name &&
  1313. (table->ctl_name == ref->ctl_name)))
  1314. match++;
  1315. if (match != 2) {
  1316. printk(KERN_ERR "%s: failed: ", __func__);
  1317. sysctl_print_path(table);
  1318. printk(" ref: ");
  1319. sysctl_print_path(ref);
  1320. printk("\n");
  1321. error = -EINVAL;
  1322. }
  1323. }
  1324. return error;
  1325. }
  1326. static void sysctl_check_leaf(struct ctl_table *table, const char **fail)
  1327. {
  1328. struct ctl_table *ref;
  1329. ref = sysctl_check_lookup(table);
  1330. if (ref && (ref != table))
  1331. set_fail(fail, table, "Sysctl already exists");
  1332. }
  1333. static void sysctl_check_bin_path(struct ctl_table *table, const char **fail)
  1334. {
  1335. struct trans_ctl_table *ref;
  1336. ref = sysctl_binary_lookup(table);
  1337. if (table->ctl_name && !ref)
  1338. set_fail(fail, table, "Unknown sysctl binary path");
  1339. if (ref) {
  1340. if (ref->procname &&
  1341. (!table->procname ||
  1342. (strcmp(table->procname, ref->procname) != 0)))
  1343. set_fail(fail, table, "procname does not match binary path procname");
  1344. if (ref->ctl_name && table->ctl_name &&
  1345. (table->ctl_name != ref->ctl_name))
  1346. set_fail(fail, table, "ctl_name does not match binary path ctl_name");
  1347. }
  1348. }
  1349. int sysctl_check_table(struct ctl_table *table)
  1350. {
  1351. int error = 0;
  1352. for (; table->ctl_name || table->procname; table++) {
  1353. const char *fail = NULL;
  1354. sysctl_repair_table(table);
  1355. if (table->parent) {
  1356. if (table->procname && !table->parent->procname)
  1357. set_fail(&fail, table, "Parent without procname");
  1358. if (table->ctl_name && !table->parent->ctl_name)
  1359. set_fail(&fail, table, "Parent without ctl_name");
  1360. }
  1361. if (!table->procname)
  1362. set_fail(&fail, table, "No procname");
  1363. if (table->child) {
  1364. if (table->data)
  1365. set_fail(&fail, table, "Directory with data?");
  1366. if (table->maxlen)
  1367. set_fail(&fail, table, "Directory with maxlen?");
  1368. if ((table->mode & (S_IRUGO|S_IXUGO)) != table->mode)
  1369. set_fail(&fail, table, "Writable sysctl directory");
  1370. if (table->proc_handler)
  1371. set_fail(&fail, table, "Directory with proc_handler");
  1372. if (table->strategy)
  1373. set_fail(&fail, table, "Directory with strategy");
  1374. if (table->extra1)
  1375. set_fail(&fail, table, "Directory with extra1");
  1376. if (table->extra2)
  1377. set_fail(&fail, table, "Directory with extra2");
  1378. if (sysctl_check_dir(table))
  1379. set_fail(&fail, table, "Inconsistent directory names");
  1380. } else {
  1381. if ((table->strategy == sysctl_data) ||
  1382. (table->strategy == sysctl_string) ||
  1383. (table->strategy == sysctl_intvec) ||
  1384. (table->strategy == sysctl_jiffies) ||
  1385. (table->strategy == sysctl_ms_jiffies) ||
  1386. (table->proc_handler == proc_dostring) ||
  1387. (table->proc_handler == proc_dointvec) ||
  1388. #ifdef CONFIG_SECURITY_CAPABILITIES
  1389. (table->proc_handler == proc_dointvec_bset) ||
  1390. #endif /* def CONFIG_SECURITY_CAPABILITIES */
  1391. (table->proc_handler == proc_dointvec_minmax) ||
  1392. (table->proc_handler == proc_dointvec_jiffies) ||
  1393. (table->proc_handler == proc_dointvec_userhz_jiffies) ||
  1394. (table->proc_handler == proc_dointvec_ms_jiffies) ||
  1395. (table->proc_handler == proc_doulongvec_minmax) ||
  1396. (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) {
  1397. if (!table->data)
  1398. set_fail(&fail, table, "No data");
  1399. if (!table->maxlen)
  1400. set_fail(&fail, table, "No maxlen");
  1401. }
  1402. if ((table->proc_handler == proc_doulongvec_minmax) ||
  1403. (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) {
  1404. if (table->maxlen > sizeof (unsigned long)) {
  1405. if (!table->extra1)
  1406. set_fail(&fail, table, "No min");
  1407. if (!table->extra2)
  1408. set_fail(&fail, table, "No max");
  1409. }
  1410. }
  1411. #ifdef CONFIG_SYSCTL_SYSCALL
  1412. if (table->ctl_name && !table->strategy)
  1413. set_fail(&fail, table, "Missing strategy");
  1414. #endif
  1415. #if 0
  1416. if (!table->ctl_name && table->strategy)
  1417. set_fail(&fail, table, "Strategy without ctl_name");
  1418. #endif
  1419. #ifdef CONFIG_PROC_FS
  1420. if (table->procname && !table->proc_handler)
  1421. set_fail(&fail, table, "No proc_handler");
  1422. #endif
  1423. #if 0
  1424. if (!table->procname && table->proc_handler)
  1425. set_fail(&fail, table, "proc_handler without procname");
  1426. #endif
  1427. sysctl_check_leaf(table, &fail);
  1428. }
  1429. sysctl_check_bin_path(table, &fail);
  1430. if (fail) {
  1431. set_fail(&fail, table, NULL);
  1432. error = -EINVAL;
  1433. }
  1434. if (table->child)
  1435. error |= sysctl_check_table(table->child);
  1436. }
  1437. return error;
  1438. }