portfns.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. void accessdir(Iobuf*, Dentry*, int, int);
  10. void addfree(Device*, Off, Superb*);
  11. void arpstart(void);
  12. void arginit(void);
  13. char* authaname(Auth*);
  14. void authinit(void);
  15. void authfree(Auth*);
  16. Auth* authnew(char*, char*);
  17. int authread(File*, uchar*, int);
  18. int authuid(Auth*);
  19. char* authuname(Auth*);
  20. int authwrite(File*, uchar*, int);
  21. void cdiag(char*, int);
  22. int cnumb(void);
  23. Device* config(void);
  24. int rawchar(int);
  25. Off bufalloc(Device*, int, long, int);
  26. void buffree(Device*, Off, int, Truncstate *);
  27. int byuid(void*, void*);
  28. int canlock(Lock*);
  29. int canqlock(QLock*);
  30. void cfsdump(Filsys*);
  31. void chanhangup(Chan *cp, char *msg, int dolock);
  32. Chan* fs_chaninit(int, int, int);
  33. void cmd_check(int, char*[]);
  34. void cmd_users(int, char*[]);
  35. void cmd_newuser(int, char*[]);
  36. void cmd_netdb(int, char*[]);
  37. void cmd_printconf(int, char*[]);
  38. void cmd_wormreset(int, char *[]);
  39. int checkname(char*);
  40. int checktag(Iobuf*, int, Off);
  41. int cksum(void*, int, int);
  42. int cksum0(int, int);
  43. void cyclstart(void);
  44. void dotrace(int);
  45. int conschar(void);
  46. void consinit(void (*)(char*, int));
  47. void consstart(int);
  48. void consserve(void);
  49. int conslock(void);
  50. int con_attach(int, char*, char*);
  51. int con_clone(int, int);
  52. int con_create(int, char*, int, int, long, int);
  53. int con_clri(int);
  54. int con_fstat(int);
  55. int con_open(int, int);
  56. int con_read(int, char*, Off, int);
  57. int con_remove(int);
  58. int con_session(void);
  59. int con_walk(int, char*);
  60. int con_write(int, char*, Off, int);
  61. int cwgrow(Device*, Superb*, int);
  62. int cwfree(Device*, Off);
  63. void cwinit(Device*);
  64. Off cwraddr(Device*);
  65. int cwread(Device*, Off, void*);
  66. void cwream(Device*);
  67. void cwrecover(Device*);
  68. Off cwsaddr(Device*);
  69. Devsize cwsize(Device*);
  70. int cwwrite(Device*, Off, void*);
  71. char* dataof(char *file);
  72. void datestr(char*, Timet);
  73. Off dbufread(Iobuf*, Dentry*, Off, Off, int);
  74. void delay(int);
  75. Filsys* dev2fs(Device *dev);
  76. int devcmpr(Device*, Device*);
  77. void devream(Device*, int);
  78. void devrecover(Device*);
  79. void devinit(Device*);
  80. int devread(Device*, Off, void*);
  81. Devsize devsize(Device*);
  82. int devwrite(Device*, Off, void*);
  83. Iobuf* dnodebuf(Iobuf*, Dentry*, Off, int, int);
  84. Iobuf* dnodebuf1(Iobuf*, Dentry*, Off, int, int);
  85. int doremove(File*, int);
  86. void dtrunc(Iobuf*, Dentry*, int);
  87. int dtrunclen(Iobuf *p, Dentry *, Off newsize, int uid);
  88. int dumpblock(Device*);
  89. void netinit(void);
  90. void netstart(void);
  91. void exit(void);
  92. void fileinit(Chan*);
  93. File* filep(Chan*, uint32_t, int);
  94. void firmware(void);
  95. int fname(char*);
  96. int fpair(char*, char*);
  97. void formatinit(void);
  98. int fread(void*, int);
  99. void freefp(File*);
  100. void freewp(Wpath*);
  101. Filsys* fsstr(char*);
  102. Devsize fwormsize(Device*);
  103. void fwormream(Device*);
  104. void fworminit(Device*);
  105. int fwormread(Device*, Off, void*);
  106. int fwormwrite(Device*, Off, void*);
  107. char* getauthlist(void);
  108. Iobuf* getbuf(Device*, Off, int);
  109. char* getwrd(char*, char*);
  110. int getc(void);
  111. Dentry* getdir(Iobuf*, int);
  112. Chan* getlcp(uchar*, long);
  113. Off getraddr(Device*);
  114. void hexdump(void*, int);
  115. int iaccess(File*, Dentry*, int);
  116. void* ialloc(uint32_t, int);
  117. Off ibbpow(int);
  118. Off ibbpowsum(int);
  119. Device* iconfig(char *);
  120. Off indfetch(Device*, Off, Off, Off , int, int, int);
  121. int ingroup(int, int);
  122. int inh(int, uchar*);
  123. Devsize inqsize(char *file);
  124. void iobufinit(void);
  125. void* iobufmap(Iobuf*);
  126. void iobufunmap(Iobuf*);
  127. int iobufql(QLock*);
  128. int jukeread(Device*, Off, void*);
  129. int jukewrite(Device*, Off, void*);
  130. void jukeinit(Device*);
  131. void jukeream(Device*);
  132. void jukerecover(Device*);
  133. Off jukesaddr(Device*);
  134. Devsize jukesize(Device*);
  135. void kbdchar(int);
  136. void lights(int, int);
  137. void launchinit(void);
  138. void localconfinit(void);
  139. int leadgroup(int, int);
  140. void lock(Lock*);
  141. void lockinit(void);
  142. void machinit(void);
  143. Msgbuf* mballoc(int, Chan*, int);
  144. void mbinit(void);
  145. void mbfree(Msgbuf*);
  146. uint32_t meminit(void);
  147. Iobuf* movebuf(Iobuf*);
  148. void mcatinit(Device*);
  149. int mcatread(Device*, Off, void*);
  150. Devsize mcatsize(Device*);
  151. int mcatwrite(Device*, Off, void*);
  152. void mirrinit(Device*);
  153. int mirrread(Device*, Off, void*);
  154. Devsize mirrsize(Device*);
  155. int mirrwrite(Device*, Off, void*);
  156. void mkqid(Qid*, Dentry*, int);
  157. int mkqidcmp(Qid*, Dentry*);
  158. void mkqid9p1(Qid9p1*, Qid*);
  159. void mkqid9p2(Qid*, Qid9p1*, int);
  160. void mlevinit(Device*);
  161. int mlevread(Device*, Off, void*);
  162. Devsize mlevsize(Device*);
  163. int mlevwrite(Device*, Off, void*);
  164. int nametokey(char*, char*);
  165. File* newfp(void);
  166. void newscsi(Device *d, Scsi *sc);
  167. Queue* newqueue(int, char*);
  168. void newstart(void);
  169. Wpath* newwp(void);
  170. Auth* newauth(void);
  171. int nvrcheck(void);
  172. char* nvrgetconfig(void);
  173. int nvrsetconfig(char*);
  174. int walkto(char*);
  175. vlong number(char*, int, int);
  176. int okay(char *quest);
  177. void online(void);
  178. void panic(char*, ...);
  179. void partinit(Device*);
  180. int partread(Device*, Off, void*);
  181. Devsize partsize(Device*);
  182. int partwrite(Device*, Off, void*);
  183. void prdate(void);
  184. void preread(Device*, Off);
  185. void prflush(void);
  186. int prime(vlong);
  187. void printinit(void);
  188. void procinit(void);
  189. void procsetname(char *fmt, ...);
  190. void putbuf(Iobuf*);
  191. void putstrn(char *str, int n);
  192. Off qidpathgen(Device*);
  193. void qlock(QLock*);
  194. void* querychanger(Device *);
  195. void qunlock(QLock*);
  196. void rahead(void *);
  197. void ream(Filsys*);
  198. void* fs_recv(Queue*, int);
  199. void rootream(Device*, Off);
  200. int roread(Device*, Off, void*);
  201. void rstate(Chan*, int);
  202. Timet rtc2sec(Rtc *);
  203. void sched(void);
  204. void schedinit(void);
  205. int scsiio(Device*, int, uchar*, int, void*, int);
  206. void scsiinit(void);
  207. Off scsiread(int, void*, long);
  208. Off scsiwrite(int, void*, long);
  209. char* sdof(Device*);
  210. void sec2rtc(Timet, Rtc *);
  211. void fs_send(Queue*, void*);
  212. void serve(void *);
  213. int serve9p1(Msgbuf*);
  214. int serve9p2(Msgbuf*);
  215. void settag(Iobuf*, int, long);
  216. void settime(Timet);
  217. void startprint(void);
  218. int strtouid(char*);
  219. Off superaddr(Device*);
  220. void superream(Device*, Off);
  221. void swab(void*, int);
  222. void swab2(void *c);
  223. void swab8(void *c);
  224. void sync(char*);
  225. int syncblock(void);
  226. void sysinit(void);
  227. int testconfig(char *s);
  228. int Tfmt(Fmt*);
  229. Timet nextime(Timet, int, int);
  230. Tlock* tlocked(Iobuf*, Dentry*);
  231. Timet toytime(void);
  232. Timet rtctime(void);
  233. void setrtc(Timet);
  234. void uidtostr(char*, int, int);
  235. Uid* uidpstr(char*);
  236. void unlock(Lock*);
  237. void newproc(void(*)(void *), void*, char*);
  238. void wormcopy(void *);
  239. void wormprobe(void);
  240. void synccopy(void);
  241. long wormsearch(Device*, int, long, long);
  242. int wormread(Device*, Off, void*);
  243. Devsize wormsize(Device*);
  244. Devsize wormsizeside(Device *, int side);
  245. void wormsidestarts(Device *dev, int side, Sidestarts *stp);
  246. int wormwrite(Device*, Off, void*);
  247. void wreninit(Device*);
  248. int wrenread(Device*, Off, void*);
  249. Devsize wrensize(Device*);
  250. int wrenwrite(Device*, Off, void*);
  251. void cmd_exec(char*);
  252. void cmd_install(char*, char*, void (*)(int, char*[]));
  253. uint32_t flag_install(char*, char*);