README.files revision 4eaa471005973e11a6110b69fe990530b3b95a38
4eaa471005973e11a6110b69fe990530b3b95a38Rishi SrivatsavaiThis guide describes the list of the files of the project.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai==========================================================
4eaa471005973e11a6110b69fe990530b3b95a38Rishi SrivatsavaiThere are two target binaries: mngr & bridge
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaio The first is a simplest tools to connect/disconnect
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai bridges and check their current connection. These its
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai functions are managed from command line simple language
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai and use the library libcli.a (see below). Beside it mngr
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai serves to transport BPDU messages between bridges; for
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai this purpose mngr uses the library libuid.a
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai The source code of the mngr: file mngr.c
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaio The second is a simulation of virtual RSTP bridge. It
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai accepts two types of messages: UID_CNTRL & UID_BPDU (see
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai file uid.h). This program is linked with the same two
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai libraries libcli.a & libuid.a; beside it uses a system
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai independent librstp.a: implementation of Rapid Spanning
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai Tree (802.1w) - see below.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai The source code of the bridge: files bridge.c,stp_cli.c,
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai * bridge.c - simulates the main bridge behavior
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai * stp_cli.c - consists from command line functions
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai * stp_to.c - API, that librstp.a uses for its purposes.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai The management communication between bridge and librstp.a
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai uses structures and definitions from the header uid_stp.h
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaio libcli.a - library for command line features. It has only
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai one file cli.c, the API is described in the header cli.h.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaio libuid.a - the 'transport' library: the source code you
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai may find in the file uid_sock.c and in the two headers:
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavaio (so far, so good) librstp.a - it is a heart of the project
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai Actually, it implements 802.1w state machines. Files
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai stpm.c - the RSTP instance (some reflection of Port0)
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai port.c - the RSTP port instance
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai portinfo.c - Port Information State Machine, 17.21
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai rolesel.c - Port Role Selection State Machine, 17.22
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai roletrns.c - Port Role Transition State Machine, 17.23
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai sttrans.c - Port State Transition State Machine, 17.24
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai topoch.c - Topology Change State Machine, 17.25
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai migrate.c - Port Protocol Migration State Machine, 17.26
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai transmit.c - Port Transmit State Machine 17.27
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai pcost.c - Path Cost Resolution State Machine
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai edge.c - operEdge Port Resolution State Machine
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai p2p.c - operPointToPoit Resolution State Machine
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai statmch.c - generic state machine implementation
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai vector.c - Priority Vectors manipulations
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai times.c - Times manipulations
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai stp_in.c - API for calls from outside.
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai sttrans.c - API for calls from outside (dedicated for creation
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai deleting, starting & stopping the RSTP instance) less
4eaa471005973e11a6110b69fe990530b3b95a38Rishi Srivatsavai relevant to the project.