SDK Your Net Corporation Counter Example Documentation

1.0

Overview

This is a sample application that is part of the sync-apps package which demonstrates JUNOS RE-SDK functionality.

counterd is a small daemon that is intended to be simpler than jnx-example. Like helloworldd, it is a good starting point for newbies to JUNOS daemons. It demonstrates DDL, ODL, DAX and the minimal amount of APIs from libjunos-sdk. It also uses patricia trees from libjuniper to store the configuration.

This application simply allows a message to be configured and provides a command to print that message back out like helloworldd. However, it also keeps a counter of the number of times the current configured message is viewed. This counter is persistent across restarts of counterd. It is also persistent between RE switchovers when GRES is enabled by doing a (set chassis redundancy graceful-switchover). When doing this "commit synchronize" must be used to commit, and then the configured message will be the same on both REs.

Viewing the message also shows the current counter value.

Here's sample output:

{master}
user@router> show sync counter message
Current Message and Counter:
  Message: HELLO!
  Times viewed: 12

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:53 2010 for SDK Your Net Corporation Counter Example 1.0 by Doxygen 1.5.1