SDK Your Net Corporation Hellopics Example: hellopics-ctrl Documentation
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-ctrl is a small daemon running on the MS PIC 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. It does a good job of demonstrating libconn to communicate between an MP-SDK application's components.
The control component in particular starts a client connection and a server. It is a client to the management component. Upon establishing this connection, it sends its ID. It is also a server to the data component. When the data component connects to it, it will receive the data component's ID. After, it should receive a message from the data component, indicating it is ready. When the control component has both sent its ID to the management component and received the ready message from the data component, it then sends its ready message to the management component indicating that it is also ready to receive and pass hello messages. If the control component receives a hello message from the management component it forwards it to the data 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-ctrl 1.0 by Doxygen 1.5.1