none
[openafs-wiki.git] / AFSLore / CodeArchitecture.mdwn
1 -- [[StevenJenkins]] - 08 Jun 2007
2
3 This is an entry point into the code architecture. As always, the source for your release is the authoritative reference, but this wiki is designed to help navigate the source and point out relevant documentation.
4
5 -- Starting Point --
6
7 - <http://www.openafs.org/cgi-bin/cvsweb.cgi/openafs/doc/pdf/> Early architectural documents. Out of date, but still important. You should especially read the Architectural Overview document (archov-doc.pdf)
8 - <http://www.eyrie.org/~eagle/tmp/openafs/1/rxgen.html> for more rxgen documentation
9 - To understand the source layout, consult src/SOURCE-MAP -- this is a good place to go after reading the Architectural Overview
10 - Need to document the build environment issues -- README, README.DEVEL, README.CVS
11 - src/BUILDNOTES (at least in the 1.4 tree) is not very helpful
12
13 -- Source Browsing --
14
15 - Getting the source, preferably via CVS
16
17 README.CVS has the following line:
18
19 Do not use the CVS tree unless you know what you're doing.
20
21 This document helps you learn what you're doing.
22
23 - cvs co, regen.sh (&amp; when to run regen.sh)
24
25 ----
26
27 In the source itself ---
28
29 - **find | grep** is very helpful. For example, to find all the RX packages (ie, so that you can start to identify the various namespaces of components), you can do:
30
31 ` find . -name \*.xg -exec grep -H "^package" {} \; | grep -v 'example' | grep -v 'bulktest' | sed -e 's|^./src/||' | sed -e 's/package/ /' | awk '{printf "%10s %s\n", $2, $1}' `
32
33 which results in: ` VOTE_ ubik/ubik_int.xg: DISK_ ubik/ubik_int.xg: SAMPLE_ ubik/utst_int.xg: VL_ vlserver/vldbint.xg: UPDATE_ update/update.xg: TEST_ rxgk/test.xg: RXGK_ rxgk/rxgk_proto.xg: RXAFSCB_ fsint/afscbint.xg: RXAFS_ fsint/afsint.xg: RXSTATS_ rxstat/rxstat.xg: PR_ ptserver/ptint.xg: BOZO_ bozo/bosint.xg: BUMON_ bubasics/backmon.xg: TC_ bubasics/butc.xg: BC_ bubasics/bumon.xg: ADK_ dauth/adkint.xg: RMTSYS_ sys/rmtsys.xg: AFSVol volser/volint.xg: `
34
35 In other words, if something starts with BOZO\_, you know that it is generated by rxgen, and the interface is defined in `bozo/bosint.xg`.
36
37 In addition to the package name, also note that only rxstat uses an M prefix; all others use S.
38
39 - cscope: what it is, how to set up, how to use, example
40 - doxygen: what it is, how to set up, how to use, how to make even more useful (ie, src code changes)
41 - gdb: examples of using (primarily b, bt)