The Sequence Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Enumerations
stk_name_service.h File Reference
#include "stk_common.h"
#include "stk_sequence.h"
#include "netinet/in.h"
Include dependency graph for stk_name_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  stk_name_ip_stct
struct  stk_name_info_stct


#define STK_MAX_NAME_LEN   96
#define STK_NAME_MAX_IPS   5
#define STK_NAME_REQUEST_SEQUENCE_NAME   "name request"
#define STK_NAME_REQUEST_SEQUENCE_ID   0x9a3e07e9
#define STK_NS_SEQ_NAME   1
#define STK_NS_SEQ_LINGER   4
#define STK_NS_SEQ_FT_STATE   7
#define STK_NS_SEQ_ID   8
#define STK_MD_HTTPD_TCP_ID   0x1000
#define STK_MD_HTTPD_UDP_ID   0x1001
#define STK_MD_HTTPD_MCAST_ID   0x1002
#define STK_HTTPD_DF_META_IDS   "monitor"
#define STK_MD_IPV4   0x8000
#define STK_MD_IPV6   0x8001
#define STK_MD_Port   0x8002
#define STK_MD_DATA_FLOW_TYPE   0x8003
#define STK_MD_SEQUENCE_ID   0x8100
#define STK_MD_DATA_FLOW_ID   0x8101
#define STK_MD_SERVICE_ID   0x8102
#define STK_MD_SERVICE_GROUP_ID   0x8103


typedef struct
typedef struct stk_name_ip_stct stk_name_ip_t
typedef enum stk_name_ft_state_enum stk_name_ft_state_t
typedef struct stk_name_info_stct stk_name_info_t
typedef void(* stk_name_info_cb_t )(stk_name_info_t *name_info, int name_count, void *server_info, void *app_info, stk_name_info_cb_type cb_type)


enum  stk_name_ft_state_enum { STK_NAME_STANDBY, STK_NAME_ACTIVE }
enum  stk_name_info_cb_type { STK_NS_REQUEST_RESPONSE, STK_NS_REQUEST_EXPIRED }

Detailed Description

This header provides the typedefs and definitions required to interface to the Name Server APIs

The Name service is a generic service to register and query names. Applications should call stk_ret stk_configure_name_service() which will initiate a connection to the name server ahead of other API calls and provides a single API to update the client's server configuration.

Macro Definition Documentation

#define STK_HTTPD_DF_META_IDS   "monitor"

Name used to get monitoring address info for stkhttpd


The max len for a group name

#define STK_MAX_NAME_LEN   96

The max len for a name

#define STK_MD_DATA_FLOW_ID   0x8101

Meta Data ID for dataflow IDs

#define STK_MD_DATA_FLOW_TYPE   0x8003

Meta Data ID for data flow type, binary

#define STK_MD_HTTPD_MCAST_ID   0x1002

Meta Data ID for multicast connectivity to stkhttpd

#define STK_MD_HTTPD_TCP_ID   0x1000

Meta Data ID for tcp connectivity to stkhttpd

#define STK_MD_HTTPD_UDP_ID   0x1001

Meta Data ID for udp connectivity to stkhttpd

#define STK_MD_IPV4   0x8000

Meta Data ID for IPV4 addresses, binary, network order

#define STK_MD_IPV6   0x8001

Meta Data ID for IPV6 addresses, binary, network order

#define STK_MD_Port   0x8002

Meta Data ID for Ports, binary

#define STK_MD_SEQUENCE_ID   0x8100

Meta Data ID for sequence IDs

#define STK_MD_SERVICE_GROUP_ID   0x8103

Meta Data ID for service group IDs

#define STK_MD_SERVICE_ID   0x8102

Meta Data ID for service IDs

#define STK_NAME_MAX_IPS   5

Maximum number of IPs assigned to a name


The max len for a protocol string

#define STK_NAME_REQUEST_SEQUENCE_ID   0x9a3e07e9

ID of the sequence used to interact with the name service

#define STK_NAME_REQUEST_SEQUENCE_NAME   "name request"

Name of the sequence used to interact with the name service


The connection address (IPV4) for this name

#define STK_NS_SEQ_FT_STATE   7

Fault Tolerant state (stk_ft_state_t)


The group name that applies to the registration/query

#define STK_NS_SEQ_ID   8

Name Server ID

#define STK_NS_SEQ_LINGER   4

The time a name should live after disconnection

#define STK_NS_SEQ_NAME   1

The Sequence item ID for names being registered/queried


Protocol for any connection info for this name


Request ID sent to name service - used by clients for uniqueness

Typedef Documentation

Enumeration describing tault tolerant state of a name

typedef void(* stk_name_info_cb_t)(stk_name_info_t *name_info, int name_count, void *server_info, void *app_info, stk_name_info_cb_type cb_type)

Callback executed when name information arrives or a request expires

Structure used to pass information about name from the name service

Structure used to hold the IP and protocol of a registered name

Structure used to hold control data about a name service

Enumeration Type Documentation

Enum passed to name information callbacks indicating the type of callback


Callback is a response from the name server


Callback is the expiration of a request