xref: /onnv-gate/usr/src/lib/librstp/common/README.files (revision 10491:8893b747ecdf)
1*10491SRishi.Srivatsavai@Sun.COMThis guide describes the list of the files of the project.
2*10491SRishi.Srivatsavai@Sun.COM==========================================================
3*10491SRishi.Srivatsavai@Sun.COM
4*10491SRishi.Srivatsavai@Sun.COMThere are two target binaries: mngr & bridge
5*10491SRishi.Srivatsavai@Sun.COMo The first  is  a simplest  tools  to  connect/disconnect
6*10491SRishi.Srivatsavai@Sun.COM  bridges and  check  their current connection.  These its
7*10491SRishi.Srivatsavai@Sun.COM  functions are managed from command line simple  language
8*10491SRishi.Srivatsavai@Sun.COM  and use the library libcli.a (see below). Beside it mngr
9*10491SRishi.Srivatsavai@Sun.COM  serves to transport BPDU messages between  bridges;  for
10*10491SRishi.Srivatsavai@Sun.COM  this purpose mngr uses the library libuid.a
11*10491SRishi.Srivatsavai@Sun.COM  The source code of the mngr: file mngr.c
12*10491SRishi.Srivatsavai@Sun.COM
13*10491SRishi.Srivatsavai@Sun.COMo The second is a simulation of virtual  RSTP  bridge.  It
14*10491SRishi.Srivatsavai@Sun.COM  accepts two types of messages: UID_CNTRL & UID_BPDU (see
15*10491SRishi.Srivatsavai@Sun.COM  file uid.h).  This program  is  linked with the same two
16*10491SRishi.Srivatsavai@Sun.COM  libraries libcli.a & libuid.a;  beside  it uses a system
17*10491SRishi.Srivatsavai@Sun.COM  independent librstp.a: implementation of Rapid  Spanning
18*10491SRishi.Srivatsavai@Sun.COM  Tree (802.1w) - see below.
19*10491SRishi.Srivatsavai@Sun.COM  The source code of the bridge: files bridge.c,stp_cli.c,
20*10491SRishi.Srivatsavai@Sun.COM  stp_to.c
21*10491SRishi.Srivatsavai@Sun.COM    * bridge.c - simulates the main bridge behavior
22*10491SRishi.Srivatsavai@Sun.COM    * stp_cli.c - consists from command line functions
23*10491SRishi.Srivatsavai@Sun.COM    * stp_to.c - API, that librstp.a uses for its purposes.
24*10491SRishi.Srivatsavai@Sun.COM  The management communication between bridge and librstp.a
25*10491SRishi.Srivatsavai@Sun.COM  uses structures and definitions from the header uid_stp.h
26*10491SRishi.Srivatsavai@Sun.COM
27*10491SRishi.Srivatsavai@Sun.COMo libcli.a - library for command line features. It has only
28*10491SRishi.Srivatsavai@Sun.COM  one file cli.c, the API is described in the header cli.h.
29*10491SRishi.Srivatsavai@Sun.COM
30*10491SRishi.Srivatsavai@Sun.COMo libuid.a - the 'transport' library: the source code you
31*10491SRishi.Srivatsavai@Sun.COM  may find in the file uid_sock.c and in the two headers:
32*10491SRishi.Srivatsavai@Sun.COM  uid.h & uid_sock.h
33*10491SRishi.Srivatsavai@Sun.COM
34*10491SRishi.Srivatsavai@Sun.COMo (so far, so good) librstp.a - it is a heart of the project
35*10491SRishi.Srivatsavai@Sun.COM  Actually, it implements 802.1w state machines. Files
36*10491SRishi.Srivatsavai@Sun.COM  stpm.c - the RSTP instance (some reflection of Port0)
37*10491SRishi.Srivatsavai@Sun.COM  port.c - the RSTP port instance
38*10491SRishi.Srivatsavai@Sun.COM  portinfo.c - Port Information State Machine, 17.21
39*10491SRishi.Srivatsavai@Sun.COM  rolesel.c - Port Role Selection State Machine, 17.22
40*10491SRishi.Srivatsavai@Sun.COM  roletrns.c - Port Role Transition State Machine, 17.23
41*10491SRishi.Srivatsavai@Sun.COM  sttrans.c - Port State Transition State Machine, 17.24
42*10491SRishi.Srivatsavai@Sun.COM  topoch.c - Topology Change State Machine, 17.25
43*10491SRishi.Srivatsavai@Sun.COM  migrate.c - Port Protocol Migration State Machine, 17.26
44*10491SRishi.Srivatsavai@Sun.COM  transmit.c - Port Transmit State Machine 17.27
45*10491SRishi.Srivatsavai@Sun.COM  pcost.c - Path Cost Resolution State Machine
46*10491SRishi.Srivatsavai@Sun.COM  edge.c - operEdge Port Resolution State Machine
47*10491SRishi.Srivatsavai@Sun.COM  p2p.c - operPointToPoit Resolution State Machine
48*10491SRishi.Srivatsavai@Sun.COM  statmch.c - generic state machine implementation
49*10491SRishi.Srivatsavai@Sun.COM  vector.c - Priority Vectors manipulations
50*10491SRishi.Srivatsavai@Sun.COM  times.c - Times manipulations
51*10491SRishi.Srivatsavai@Sun.COM  stp_in.c - API for calls from outside.
52*10491SRishi.Srivatsavai@Sun.COM  sttrans.c - API for calls from outside (dedicated for creation
53*10491SRishi.Srivatsavai@Sun.COM              deleting, starting & stopping the RSTP instance) less
54*10491SRishi.Srivatsavai@Sun.COM              relevant to the project.
55*10491SRishi.Srivatsavai@Sun.COM
56*10491SRishi.Srivatsavai@Sun.COM
57*10491SRishi.Srivatsavai@Sun.COM
58*10491SRishi.Srivatsavai@Sun.COM
59