BroadView™ API Guide and Reference Manual
Building the Source Code

The individual module produces respective archive files (.a files.). All archive files are built under module specific subfolder in broadview/output directory. The common make file, tools/Make.common generates executable binaries for BroadViewAgent and the reference application.

Follow the steps mentioned below to build the source code:

1.Decompress the source code from the release archive.

# bunzip2 <release-archive-tarball.bz2>
# tar -xf tarball

2.Set the OPENNSL build environment variable to point to the location of the OPENNSL source tree.

# export OPENNSL = "path to OPENNSL source code"
Eg: export OPENNSL = /home/tmp/opennsl-3.2.0.4-cdp

Note:

Ensure that the location pointed to by the OPENNSL environment variable has full read-write permissions.

3.Change the working directory to <broadview-base>/output/<build signature>

# cd <broadview-base>/output/<build signature>
Eg: cd <broadview-base>/output/Broadcom-td2_svk-gto-BL20-opennsl-6458-BPV

4.Edit "<broadview-base>/output/<build signature>/Makefile" and update CROSS_COMPILE variable pointing to installed tool chain location

# export CROSS_COMPILE = "tool chain path"

5.Execute make command

# make

The executables and the shared libraries generated by the make process can be located in <broadview-base>/output/<build signature>/deliverables directory.

executables.jpg

Notes:

1.The supplied makefiles & scripts require make version 3.82. In particular, make version 4.x is not supported. To force the required version, ensure that the build system has support for make 3.82 and set the following environment variable.

# export MAKEVER=3.82

2.Care must be taken to avoid spaces in directory names, since Linux commands normally treat spaces as parameter separator, thereby resulting in build failures. If it is a MUST that directory names contain embedded spaces, such space characters MUST be preceded by the escape character (\) while invoking the make command.

Both the agent (BroadViewAgent) and reference application (BroadViewBstApp and BroadViewPacketTraceApp) communicate over HTTP. A configuration file is needed for each of these applications. The file includes information like IP address and the Layer 4 ports used for the HTTP communication between them. These files are described below. Later instructions describe the process of using these files on the Platform.

BroadViewAgent

The configuration file for the BroadViewAgent should be named as agent_config.cfg. The content of the file are properties described in name-value pairs, as mentioned below.

bview_client_ip=<ip address of reference application>

bview_client_port=<port number to which reference application listens>

agent_port=<port number on which agent application listens>

Sample file contents below

bview_client_ip=127.0.0.1
bview_client_port=9070
agent_port=8080

A sample configuration file is part of the distribution at <broadview-base>/src/nb_plugin/rest/agent_config.cfg. Any Linux text editor can be used to edit this file to suit the needs. Any changes must be saved to the disk. The file must have Unix style line-endings.

No additional properties apart from those listed above are supported. If the configuration file can't be read by the BroadViewAgent, or if the file is corrupt, an error message is generated and factory default values are used. The factory default values are as follows:

Default BroadViewAgent IP Address is 127.0.0.1
Default BroadViewAgent Port Number is 8080
Default Reference Application Port Number is 9070

BroadViewBstApp

The configuration file for the BroadViewBstApp should be named as bstapp_config.cfg. The content of the file are properties described in name-value pairs, as mentioned below.

agent_ip="<ip address of agent >"
agent_port="<port number to which agent listens>"
bstapp_port="<port number to which reference application should listen>"
bstapp_max_reports="<maximum number of asynchronous reports including periodic and trigger>"

A sample file is provided below

agent_ip=127.0.0.1
agent_port=8080
bstapp_port=9070
bstapp_max_reports=10

A sample configuration file is part of the distribution at <broadview-base>/example/bst_app/bstapp_config.cfg. Any Linux text editor can be used to edit this file to suit the needs. Any changes must be saved to the disk. The file must have Unix style line-endings.

No additional properties apart from those listed above are supported. If the configuration file can't be read by BroadViewBstApp, or if the file is corrupt, an error message is generated and factory default values are used.

Default BroadViewBstApp IP Address is 127.0.0.1
Default BroadViewBstApp Port Number is 9070
Default Agent Port Number is 8080
Default Max Report is 10

BroadViewPacketTraceApp

The configuration file for the BroadViewPacketTraceApp should be named as ptapp_config.cfg. The content of the file are properties described in name-value pairs, as mentioned below.

agent_ip="<ip address of agent >"
agent_port="<port number to which agent listens>"
ptapp_port="<port number to which reference application should listen>"

A sample file is provided below.

agent_ip=127.0.0.1
agent_port=8080
ptapp_port=9070

A sample configuration file is part of the distribution at <broadview>/example/packet_trace_app/ptapp_config.cfg. Any Linux text editor can be used to edit this file to suit the needs. Any changes must be saved to the disk. The file must have Unix style line-endings. No additional properties apart from those listed above are supported. If the configuration file can't be read by BroadViewPacketTraceApp, or if the file is corrupt, an error message is generated and factory default values are used.

Default BroadViewPacketTraceApp IP Address is 127.0.0.1
Default BroadViewPacketTraceApp Port Number is 9070
Default Agent Port Number is 8080