/usr.bin/systat/extern.h

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 171 lines · 134 code · 6 blank · 31 comment · 0 complexity · e77942e97564f2c7e8bc9884de85b33f MD5 · raw file

  1. /*-
  2. * Copyright (c) 1991, 1993
  3. * The Regents of the University of California. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 4. Neither the name of the University nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. * SUCH DAMAGE.
  28. *
  29. * @(#)extern.h 8.1 (Berkeley) 6/6/93
  30. * $FreeBSD$
  31. */
  32. #include <sys/cdefs.h>
  33. #include <fcntl.h>
  34. #include <kvm.h>
  35. extern struct cmdtab *curcmd;
  36. extern struct cmdtab cmdtab[];
  37. extern struct text *xtext;
  38. extern WINDOW *wnd;
  39. extern char **dr_name;
  40. extern char c, *namp, hostname[];
  41. extern double avenrun[3];
  42. extern float *dk_mspw;
  43. extern kvm_t *kd;
  44. extern long ntext, textp;
  45. extern int *dk_select;
  46. extern int CMDLINE;
  47. extern int dk_ndrive;
  48. extern int hz, stathz;
  49. extern double hertz; /* sampling frequency for cp_time and dk_time */
  50. extern int col;
  51. extern int nhosts;
  52. extern int nports;
  53. extern int protos;
  54. extern int verbose;
  55. extern unsigned int delay;
  56. struct inpcb;
  57. extern struct device_selection *dev_select;
  58. extern long generation;
  59. extern int num_devices;
  60. extern int num_selected;
  61. extern int num_selections;
  62. extern long select_generation;
  63. extern struct nlist namelist[];
  64. int checkhost(struct inpcb *);
  65. int checkport(struct inpcb *);
  66. void closeicmp(WINDOW *);
  67. void closeicmp6(WINDOW *);
  68. void closeifstat(WINDOW *);
  69. void closeiostat(WINDOW *);
  70. void closeip(WINDOW *);
  71. void closeip6(WINDOW *);
  72. void closekre(WINDOW *);
  73. void closembufs(WINDOW *);
  74. void closenetstat(WINDOW *);
  75. void closepigs(WINDOW *);
  76. void closeswap(WINDOW *);
  77. void closetcp(WINDOW *);
  78. int cmdifstat(const char *, const char *);
  79. int cmdiostat(const char *, const char *);
  80. int cmdkre(const char *, const char *);
  81. int cmdnetstat(const char *, const char *);
  82. struct cmdtab *lookup(const char *);
  83. void command(const char *);
  84. void die(int);
  85. void display(void);
  86. int dkinit(void);
  87. int dkcmd(char *, char *);
  88. void error(const char *fmt, ...) __printflike(1, 2);
  89. void fetchicmp(void);
  90. void fetchicmp6(void);
  91. void fetchifstat(void);
  92. void fetchip(void);
  93. void fetchip6(void);
  94. void fetchiostat(void);
  95. void fetchkre(void);
  96. void fetchmbufs(void);
  97. void fetchnetstat(void);
  98. void fetchpigs(void);
  99. void fetchswap(void);
  100. void fetchtcp(void);
  101. void getsysctl(const char *, void *, size_t);
  102. int ifcmd(const char *cmd, const char *args);
  103. int initicmp(void);
  104. int initicmp6(void);
  105. int initifstat(void);
  106. int initip(void);
  107. int initip6(void);
  108. int initiostat(void);
  109. int initkre(void);
  110. int initmbufs(void);
  111. int initnetstat(void);
  112. int initpigs(void);
  113. int initswap(void);
  114. int inittcp(void);
  115. int keyboard(void);
  116. int kvm_ckread(void *, void *, int);
  117. void labelicmp(void);
  118. void labelicmp6(void);
  119. void labelifstat(void);
  120. void labelip(void);
  121. void labelip6(void);
  122. void labeliostat(void);
  123. void labelkre(void);
  124. void labelmbufs(void);
  125. void labelnetstat(void);
  126. void labelpigs(void);
  127. void labels(void);
  128. void labelswap(void);
  129. void labeltcp(void);
  130. void load(void);
  131. int netcmd(const char *, const char *);
  132. void nlisterr(struct nlist []);
  133. WINDOW *openicmp(void);
  134. WINDOW *openicmp6(void);
  135. WINDOW *openifstat(void);
  136. WINDOW *openip(void);
  137. WINDOW *openip6(void);
  138. WINDOW *openiostat(void);
  139. WINDOW *openkre(void);
  140. WINDOW *openmbufs(void);
  141. WINDOW *opennetstat(void);
  142. WINDOW *openpigs(void);
  143. WINDOW *openswap(void);
  144. WINDOW *opentcp(void);
  145. int prefix(const char *, const char *);
  146. void reseticmp(void);
  147. void reseticmp6(void);
  148. void resetip(void);
  149. void resetip6(void);
  150. void resettcp(void);
  151. void showicmp(void);
  152. void showicmp6(void);
  153. void showifstat(void);
  154. void showip(void);
  155. void showip6(void);
  156. void showiostat(void);
  157. void showkre(void);
  158. void showmbufs(void);
  159. void shownetstat(void);
  160. void showpigs(void);
  161. void showswap(void);
  162. void showtcp(void);
  163. void status(void);
  164. void suspend(int);
  165. char *sysctl_dynread(const char *, size_t *);