home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / comm / tcp / ATCP_src_22.lha / AmiTCP-2.2 / src / amitcp / kern / variables.src < prev   
Encoding:
C/C++ Source or Header  |  1993-11-07  |  12.4 KB  |  314 lines

  1. # $Id: variables.src,v 1.14 1993/11/06 23:51:22 ppessi Exp $
  2. #
  3. # variables.src --- Configuration and query variables
  4. #
  5. # Author: Pekka Pessi <Pekka.Pessi@hut.fi>
  6. #
  7. # Copyright (c) 1993 Pekka Pessi
  8. #                    All rights reserved
  9. #
  10. # Created      : Wed Apr 28 19:47:10 1993 ppessi
  11. # Last modified: Thu Nov  4 07:26:20 1993 ppessi
  12. #
  13. # $Log: variables.src,v $
  14. # Revision 1.14  1993/11/06  23:51:22  ppessi
  15. # Added ROUTES pseudoarray (returns routing table).
  16. #
  17. # Revision 1.13  1993/08/09  15:20:16  jraja
  18. # Changed usens choises to \CODE on tex output.
  19. #
  20. # Revision 1.12  1993/06/03  20:52:25  jraja
  21. # *** empty log message ***
  22. #
  23. # Revision 1.11  1993/06/03  16:40:09  jraja
  24. # Added USENS, updated to use enumeration variables.
  25. #
  26. # Revision 1.9  1993/05/29  21:16:46  jraja
  27. # Fixed ICMPHIST, added MBTS=MBUF_TYPE_STATS, changed few writeables to
  28. # configuration-only writeables, commented out NS=NS1=NSPRIM, added
  29. # DBIP=DEBUGIP, GTW=GATEWAY, REDIR=IPSENDREDIRECTS, TCPSND=TCP_SENDSPACE
  30. # and TCPRCV=TCP_RECVSPACE.
  31. #
  32. # Revision 1.8  93/05/13  16:16:50  16:16:50  ppessi (Pekka Pessi)
  33. # Changed variable documentation
  34. # Revision 1.7  93/05/04  13:44:39  13:44:39  ppessi (Pekka Pessi)
  35. # Fixed 'WITH' comment
  36. # Revision 1.6  93/05/03  19:58:07  19:58:07  jraja (Jarno Tapio Rajahalme)
  37. # minor changes to some descriptions.
  38. # Revision 1.5  93/05/03  18:50:19  18:50:19  puhuri (Markus Peuhkuri)
  39. # Add ICH=ICMPHIST.
  40. # Revision 1.4  93/04/29  22:04:44  22:04:44  puhuri (Markus Peuhkuri)
  41. # Fixed some function7variable names, tabulation, add some aliases.
  42. # Revision 1.3  93/04/29  09:01:32  09:01:32  puhuri (Markus Peuhkuri)
  43. # Made file bit readable by adding spaces and tabs to surround
  44. # field seperators.
  45. # Revision 1.2  93/04/28  21:53:37  21:53:37  ppessi (Pekka Pessi)
  46. # Documentation and definition for configureable variables.
  47. # Revision 1.1  93/04/28  19:27:31  19:27:31  puhuri (Markus Peuhkuri)
  48. # Initial revision
  49. #
  50. # Code for AmiTCP
  51. # FS="[\t ]*;[\t ]*", comment = ^#
  52. # $1= [alias=...]variable
  53. # $2= level of variable
  54. # $3= description of variable
  55. WITH ;    1 ;    Include a file with multiple settings. (This pseudo variable is a extension to the {\CODE SET} command.)
  56. /* read_sets() is declared in amiga_config.h */
  57. { VAR_FUNC, VF_RW, NULL, NULL, (notify_f)read_sets }
  58. # ICMP
  59. #
  60. IC=ICMP ;    1 ;    Variables related to Internet Message Control Protocol.
  61. extern LONG icmpstat;
  62. { VAR_LONG, VF_TABLE|VF_READ, KW_ICMP, &icmpstat, NULL }
  63. E=ERROR ;    2 ;    Number of calls to icmp_error().
  64. S=SHORTOLD ;    2 ;    No error because old IP was too short.
  65. I=ICMPOLD ;    2 ;    No error because old was ICMP.
  66. CO=CODE ;    2 ;    ICMP code out of range.
  67. T=TOOSHORT ;    2 ;    Packet too short.
  68. CH=CHKSUM ;    2 ;    Checksum error.
  69. L=LENGTH ;    2 ;    Data length larger than packet.
  70. R=RESPONSES ;    2 ;    Number of responses.
  71. #
  72. # ICMP HISTORY
  73. #
  74. ICH=ICMPHIST;    1 ;    ICMP packet send and reception history. See page \pageref{icmp-messages} for details on the output format.
  75. extern LONG read_icmphist(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  76. { VAR_FUNC, VF_READ, NULL, (notify_f)read_icmphist, NULL }
  77. #
  78. # IP
  79. #
  80. IP ;    1 ;    Variables related to Internet Protocol.
  81. extern LONG ipstat;
  82. { VAR_LONG, VF_TABLE|VF_READ, KW_IP,   &ipstat,   NULL }
  83. T=TOTAL ;    2 ;    Total number of packets.
  84. CH=CHKSUM ;    2 ;    Checksum error.
  85. TOOSH=TOOSHORT ;2 ;    Packet too short.
  86. TOOSM=TOOSMALL ;2 ;    Not enough data.
  87. H=HEADER ;    2 ;    IP header length less than data size.
  88. LE=LENGTH ;    2 ;    IP header length larger than packet.
  89. FS=FRAGMENTS ;    2 ;    Packet fragments received.
  90. FD=FDROP ;    2 ;    Fragments dropped (duplicates, out of space).
  91. FT=FTIMEOUT ;    2 ;    Fragments timed out.
  92. FO=FORWARD ;    2 ;    Packets forwarded.
  93. FW=FWDCANT ;    2 ;    Packets received for unreachable destination.
  94. RED=REDIRECTSENT ;2 ;    Packets forwarded on same net.
  95. N=NOPROTO ;    2 ;    Unknown or unsupported protocol.
  96. D=DELIVER ;    2 ;    Packets consumed here.
  97. LO=LOCALOUT ;    2 ;    Total IP packets generated here.
  98. OD=ODROPPED ;    2 ;    Lost packets due to nobufs, etc.
  99. REA=REASSEMBLED ;2 ;    Total packets reassembled ok.
  100. FE=FED ;    2 ;    Output packets fragmented ok.
  101. OF=OFRAGMENTS ;    2 ;    Output fragments created.
  102. FC=FCANT ;    2 ;    Don't fragment flag was set, etc.
  103. #
  104. # TCP
  105. #
  106. T=TCP ;    1 ;    Variables related to Transmission Control Protocol.
  107. extern LONG tcpstat;
  108. { VAR_LONG, VF_TABLE|VF_READ, KW_TCP,  &tcpstat,  NULL }
  109. CA=CATTEM ;    2 ;    Connections initiated.
  110. A=ACCEPTS ;    2 ;    Connections accepted.
  111. CO=CONNECT ;    2 ;    Connections established.
  112. DR=DROPS ;    2 ;    Connections dropped.
  113. CD=CDROPS ;    2 ;    Embryonic connections dropped.
  114. CL=CLOSED ;    2 ;    Connections closed (incl. drops).
  115. SE=SEGSTIMED ;    2 ;    Segments where we tried to get rtt.
  116. RTT=RTTUPDATE ;    2 ;    Times we succeed rtt.
  117. DE=DELACK ;    2 ;    Delayed acknowledgments sent.
  118. T=TIMEODROP ;    2 ;    Connection dropped in rxmt timeout.
  119. RE=REXMTT ;    2 ;    Retransmit timeouts.
  120. P=PERSIST ;    2 ;    Persist timeouts.
  121. KAT=KATIMEO ;    2 ;    Keepalive timeouts.
  122. KAP=KAPROBE ;    2 ;    Keepalive probes sent.
  123. KAD=KADROPS ;    2 ;    Connections dropped in keepalive.
  124. ST=STOTAL ;    2 ;    Total packets sent.
  125. SP=SPACK ;    2 ;    Data packets sent.
  126. SB=SBYTE ;    2 ;    Data bytes sent.
  127. SREP=SREPACK ;    2 ;    Data packets retransmitted.
  128. SREB=SREBYTE ;    2 ;    Data bytes retransmitted.
  129. SA=SACKS ;    2 ;    Ack-only packets sent.
  130. SWP=SWPROBE ;    2 ;    Window probes sent.
  131. SU=SURGENT ;    2 ;    Packets sent with URG only.
  132. SWU=SWUPDATE ;    2 ;    Window update-only packets sent.
  133. SC=SCTRL ;    2 ;    Control \verb-(SYN|FIN|RST)- packets sent.
  134. RTO=RTOTAL ;    2 ;    Total packets received.
  135. RPA=RPACK ;    2 ;    Packets received in sequence.
  136. RB=RBYTE ;    2 ;    Bytes received in sequence.
  137. RC=RCHKSUM ;    2 ;    Packets received with checksum errors.
  138. ROF=ROFFSET ;    2 ;    Packets received with bad offset.
  139. RPS=RPSHORT ;    2 ;    Packets received too short.
  140. RDUPP=RDUPPACK ;2 ;    Duplicate-only packets received.
  141. RDUPB=RDUPBYTE ;2 ;    Duplicate-only bytes received.
  142. RPDUPD=RPDUPDATA ;2 ;    Packets with some duplicate data.
  143. RPDUPB=RPDUPBYTE ;2 ;    Dup. bytes in part-dup. packets.
  144. ROOP=ROOPACK ;    2 ;    Out-of-order packets received.
  145. ROOB=ROOBYTE ;    2 ;    Out-of-order bytes received.
  146. RPL=RPLATE ;    2 ;    Packets with data after window.
  147. RBL=RBLATE ;    2 ;    Bytes received after window.
  148. RAF=RAFTER ;    2 ;    Packets received after close.
  149. RWP=RWPROBE ;    2 ;    Received window probe packets.
  150. RDUPA=RDUPACK ;    2 ;    Received duplicate acknowledgments.
  151. RACKT=RACKTOOM ;2 ;    Received acknowledgments for unsent data.
  152. RACKP=RACKPACK ;2 ;    Received acknowledgment packets.
  153. RACKB=RACKBYTE ;2 ;    Bytes acknowledged by received acknowledgments.
  154. RWU=RWUPDATE ;    2 ;    Received window update packets.
  155. #
  156. # UDP
  157. #
  158. U=UDP ;    1 ;    Variables related to User Datagram Protocol.
  159. extern LONG udpstat;
  160. { VAR_LONG, VF_TABLE|VF_READ, KW_UDP,  &udpstat,  NULL }
  161. I=ITOTAL ;    2 ;    Total input packets.
  162. H=HEADSHORT ;    2 ;    Packet shorter than header.
  163. C=CHKSUM ;    2 ;    Checksum error.
  164. L=LENGTH ;    2 ;    Data length larger than packet.
  165. N=NOPORT ;    2 ;    No socket on port.
  166. B=BCNOPORT ;    2 ;    No socket on port, arrived as broadcast.
  167. F=FULLSOC ;    2 ;    Not delivered, input socket full.
  168. M=MISPCB ;    2 ;    Input packets missing pcb cache.
  169. O=OTOTAL ;    2 ;    Total output packets.
  170. #
  171. # Connection table
  172. #
  173. CONNECTIONS;    1 ;    Returns a list of all TCP and UDP connections, including server (listening) sockets. See page \pageref{connection-format} for the output format description.
  174. LONG getsockets(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  175. { VAR_FUNC, VF_READ, NULL, (notify_f)getsockets, NULL }
  176. #
  177. # Routing table
  178. #
  179. ROUTES ;        1 ;     Returns a list of routing entries for specified protocol family. See page \pageref{routing-format} for the output format description.
  180. LONG getroutes(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  181. { VAR_FUNC, VF_READ, NULL, (notify_f)getroutes, NULL }
  182. #
  183. # These are in the numeric order as in <sys/socket.h>.
  184. # Do not change the order!
  185. #
  186. global STRPTR KW_Protocols = KW_ROUTES;
  187. ALL        ; 2 ;    Unspecified
  188. UNIX        ; 2 ;    Local to host (pipes, portals)
  189. INET        ; 2 ;    Internetwork: UDP, TCP, etc.
  190. IMPLINK        ; 2 ;    Arpanet IMP Addresses
  191. PUP        ; 2 ;    PUP Protocols: e.g. BSP
  192. CHAOS        ; 2 ;    mit CHAOS protocols
  193. NS        ; 2 ;    XEROX NS protocols
  194. ISO        ; 2 ;    ISO protocols
  195. ECMA        ; 2 ;    European Computer Manufacturers
  196. DATAKIT        ; 2 ;    Datakit Protocols
  197. CCITT        ; 2 ;    CCITT protocols, X.25 etc
  198. SNA        ; 2 ;    IBM SNA
  199. DECnet        ; 2 ;    DECnet
  200. DLI        ; 2 ;    DEC Direct Data Link Interface
  201. LAT        ; 2 ;    LAT
  202. HYLINK        ; 2 ;    NSC Hyperchannel
  203. APPLETALK    ; 2 ;    Apple Talk
  204. ROUTE        ; 2 ;    Internal Routing Protocol
  205. LINK        ; 2 ;    Link layer interface
  206. XTP        ; 2 ;    eXpress Transfer Protocol
  207. #
  208. # MBUF
  209. #
  210. MBS=MBUF_STAT ;    1 ;    Memory buffer statistics.
  211. extern LONG mbstat;
  212. { VAR_LONG, VF_TABLE|VF_READ, KW_MBUF_STAT, &mbstat, NULL }
  213. M=MBUFS ;    2 ;    Total number of allocated memory buffers.
  214. CL=CLUSTERS ;    2 ;    Total number of allocated memory buffer clusters.
  215. CLF=CLFREE ;    2 ;    Number of memory buffer clusters free.
  216. MD=MDROPS ;    2 ;    Times failed to find space.
  217. NW=NWAITED ;    2 ;    Times waited for space.
  218. ND=NDRAINED ;    2 ;    Times drained protocols for space.
  219. TMU=TOTALMEMORYUSED ;2;    Total amount of memory used for the mbufs.
  220. #
  221. # MBUF type specific statistics
  222. #
  223. MBTS=MBUF_TYPE_STATS;    1 ;    Returns type specific statistics of mbuf allocations. The last number is the total number of mbufs allocated.
  224. extern LONG mb_read_stats(struct CSource *args, UBYTE **errstrp, struct CSource *res);
  225. { VAR_FUNC, VF_READ, NULL, (notify_f)mb_read_stats, NULL }
  226. #
  227. # MBUF Configuration
  228. #
  229. MBC=MBUF_CONF ;    1 ;    Memory buffer configuration.
  230. extern LONG mbconf; int mb_check_conf(void *pt, LONG new);
  231. { VAR_LONG, VF_TABLE|VF_RCONF,   KW_MBUF_CONF, &mbconf, mb_check_conf }
  232. I=INITIAL ;    2 ;    Number of mbuf chunks to allocate initially.
  233. CH=CHUNK ;    2 ;    Number of mbufs to allocate at a time.
  234. CL=CLCHUNK ;    2 ;    Number of clusters to allocate at a time.
  235. MM=MAXMEM ;    2 ;    Maximum memory to use (in kilobytes).
  236. CS=CLUSTERSIZE ;2 ;    Size of an mbuf cluster.
  237. #
  238. # LOG configuration
  239. #
  240. LOG ;    1 ;    Logging system configuration.
  241. extern LONG log_cnf;
  242. { VAR_LONG, VF_TABLE|VF_RCONF,   KW_LOG, &log_cnf, NULL }
  243. COUNT ;    2 ;    Number of log messages to use.
  244. LEN ;    2 ;    Maximum length of a log message.
  245. #
  246. # Single variables
  247. #
  248. # This is an example of the VAR_INET type variable
  249. #
  250. #NS=NS1=NSPRIM ;    1 ;    Address of the primary nameserver.
  251. #struct sockaddr_in ns_1 = { sizeof(ns_1), AF_INET };
  252. #{ VAR_INET, VF_RW, NULL, &ns_1.sin_addr, NULL }
  253. #
  254. TASKNAME ;    1 ;    Name of \AMITCP{} task.
  255. extern STRPTR taskname; int taskname_changed(void *pt, LONG new);
  256. { VAR_STRP, VF_RCONF, NULL, &taskname, taskname_changed }
  257. #
  258. NTH=NTHBASE ;    1 ;    Current \AMITCP{} has nth \LIB{} base currently in memory.
  259. extern LONG nthLibrary;
  260. { VAR_LONG, VF_RW, NULL, &nthLibrary,  NULL }
  261. #
  262. DBSANA=DEBUGSANA ;    1 ;    Boolean to switch the SANA-II device interface debugging on and off\footnote{See page \pageref{boolean-variables} for description about boolean variable.}.
  263. extern LONG debug_sana;
  264. { VAR_ENUM, VF_RW, NULL, &debug_sana, boolean_enum }
  265. #
  266. DBICMP=DEBUGICMP ;    1 ;    Boolean to switch the ICMP debugging on and off.
  267. extern LONG icmpprintfs;
  268. { VAR_ENUM, VF_RW, NULL, &icmpprintfs, boolean_enum }
  269. #
  270. DBIP=DEBUGIP ;    1 ;    Boolean telling whether IP should log debugging information.
  271. extern LONG ipprintfs;
  272. { VAR_ENUM, VF_RW, NULL, &ipprintfs, boolean_enum }
  273. #
  274. GTW=GATEWAY ;    1 ;    Boolean to switch gateway functionality on and off.
  275. extern LONG ipforwarding;
  276. { VAR_ENUM, VF_RW, NULL, &ipforwarding, boolean_enum }
  277. #
  278. REDIR=IPSENDREDIRECTS ;    1 ;    Boolean telling whether IP should send ICMP redirect messages.
  279. extern LONG ipsendredirects;
  280. { VAR_ENUM, VF_RW, NULL, &ipsendredirects, boolean_enum }
  281. #
  282. USENS=USENAMESERVER ;    1 ;    How to use name server. Possible values are:\begin{description}\item[\CODE NO] Do not use name server at all. Local database will be used instead.\item[\CODE FIRST] Query the name servers first and if that fails, use local database.\item[\CODE SECOND] First look up the local database, then, if that fails, query the name servers.\end{description}
  283. extern LONG usens;
  284. { VAR_ENUM, VF_RW, NULL, &usens, (notify_f)"NO,FIRST,SECOND" }
  285. #
  286. ULO=USELOOPBACK ;    1 ;    If true use the local loop device for local traffic.
  287. extern LONG useloopback;
  288. { VAR_ENUM, VF_RW, NULL, &useloopback, boolean_enum }
  289. #
  290. TCPSND=TCP_SENDSPACE ;    1 ;    Default size of the sending socket buffer (TCP).
  291. extern ULONG tcp_sendspace;
  292. { VAR_LONG, VF_RW, NULL, (LONG*)&tcp_sendspace, NULL }
  293. #
  294. TCPRCV=TCP_RECVSPACE ;    1 ;    Default size of the receiving socket buffer (TCP).
  295. extern ULONG tcp_recvspace;
  296. { VAR_LONG, VF_RW, NULL, (LONG*)&tcp_recvspace, NULL }
  297. #
  298. CON=CONSOLENAME ;    1 ;    Filename for the log console.
  299. extern STRPTR consolename ;     int logname_changed(void *pt, LONG new);
  300. { VAR_STRP, VF_RW, NULL, &consolename, logname_changed }
  301. #
  302. LOGF=LOGFILENAME ;    1 ;    Filename for the log file.
  303. extern STRPTR logfilename;
  304. { VAR_STRP, VF_RW, NULL, &logfilename, logname_changed }
  305.