SDK Your Net Corporation Hellopics Example: hellopics-data Documentation

1.0

Overview

This is a sample application that is part of the sync-hellopics-apps package and one of the three parts to the hellopics application which demonstrates simple JUNOS MP-SDK functionality, with a focus on component communication. There are generally (but not by requirement) three components to an MP-SDK application. Two components run on the Multi-Services PIC, namely the data and control components. These components only have access to the MP-SDK libraries. The third component, called the management component, runs on the routing engine (RE) and is in fact an RE-SDK application that may simply communicate with the other two. It only has access to the RE-SDK libraries. Of course some libraries are part of both sets like libconn for example.

The purpose of the hellopics application is to pass hello messages in a cycle between the three components. The management component operates on a 60-second interval timer. It initiates a hello message carrying a sequence number as data upon the timer expiry event. The first hello message is sent to the data component, the second to the control component, and the direction remains alternating.

hellopics-data is a small daemon running on the data plane (the fast path) and intended to be simple. It is a good starting point for beginners to the JUNOS MP-SDK. It demonstrates the minimal amount of API usage from libmp-sdk. In fact, it processes no traffic at all. It does a good job of demonstrating libconn to communicate between an MP-SDK application's components. Because it is a data component-style application (hence the name), it does call msp_init and msp_exit to prepare for and wrap up typical data-path-application operations (like setting up data loops). These are not officially needed here since this application does not start any data loops, but it is included for demonstration purposes, serving as a basic starting point for your own application development where data loops will eventually be created.

The data component in particular starts two client connections. One, first, to the management component. Upon establishing this connection, it sends its ID and a request for its peer's connection information. The management component replies with its peer's connection information (that of the control component). Upon receiving this information, the data component opens the second client connection to the control component. Upon establishing this connection, it sends its ID. It then sends a message to both other components to inform them that it is ready to receive and pass hello messages in the cycle. If the data component receives a hello message from the management component it forwards it to the control component and vice-versa.


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:58 2010 for SDK Your Net Corporation Hellopics Example: hellopics-data 1.0 by Doxygen 1.5.1