junos_re_info.h File Reference

APIs to retrieve Routing Engine information for use by JUNOS SDK applications. More...


Defines

#define JUNOS_ROUTING_ENGINE_0   1
 Routing engine in slot 0.
#define JUNOS_ROUTING_ENGINE_1   2
 Routing engine in slot 1.
#define JUNOS_ROUTING_ENGINE_MASTER   3
 Master routing engine.
#define JUNOS_ROUTING_ENGINE_BACKUP   4
 Backup routing engine.
#define JUNOS_ROUTING_ENGINE_LOCAL   5
 Routing engine application is running on.
#define JUNOS_ROUTING_ENGINE_OTHER   6
 Routing engine in the other slot.

Typedefs

typedef int junos_routing_engine_info_t
 Routing engine information type.

Functions

int junos_re_info_slot (void)
 Get the chassis slot number for the routing engine the application is running on.
int junos_re_info_hostname (junos_routing_engine_info_t re, char *name, size_t namesz)
 Get the host name for a specific routing engine in the chassis This API is thread safe.


Detailed Description

APIs to retrieve Routing Engine information for use by JUNOS SDK applications.


Function Documentation

int junos_re_info_hostname junos_routing_engine_info_t  re,
char *  name,
size_t  namesz
 

Get the host name for a specific routing engine in the chassis This API is thread safe.

Parameters:
[in] re Which routing engine to get the host name for
[out] name Pointer to buffer to store the host name
[in] namesz Size of the buffer name
Note:
This function will make sure the resulting string is NUL-terminated, even if it means truncating the name.
Returns:
The total number of characters attempted to be copied into the buffer name on success; -1 on an error.
On error, errno will be set to one of the following values:
  • EINVAL Invalid argument
  • ENOENT No result found for the requested routing engine

int junos_re_info_slot void   ) 
 

Get the chassis slot number for the routing engine the application is running on.

This API is thread safe.

Returns:
Slot number on the chassis where the routing engine is installed


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:23:49 2010 for libjunos-sdk by Doxygen 1.4.5