sysctl_check.c 51 KB

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