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