Network Developers Kit API  3.76.00.05
Data Fields
_ci_srvargs Struct Reference

Common service arguments. More...

#include <netcfg.h>

Collaboration diagram for _ci_srvargs:
Collaboration graph

Data Fields

uint32_t Item
 
void * hService
 
uint32_t Mode
 
uint32_t Status
 
uint32_t ReportCode
 
uint32_t IfIdx
 
uint32_t IPAddr
 
void(* pCbSrv )(uint32_t Item, uint32_t Status, uint32_t Code, void *hCfgEntry)
 

Detailed Description

Common service arguments.

All services share this common, base structure.

Field Documentation

§ Item

uint32_t _ci_srvargs::Item

This is a copy of the Item value used when the entry is added to the configuration. Its initial value should be NULL, but it is overwritten by the service provider callback. It is used so that the status callback function can be provided with the original Item value.

§ hService

void* _ci_srvargs::hService

This is the handle to the service as returned by the NETTOOLS function corresponding to the type of service requested. Its initial value should be NULL, and it is initialized by the service callback function when the service is started. The value is needed to shut down the service when the configuration is unloaded.

§ Mode

uint32_t _ci_srvargs::Mode

The mode parameter is a collection of flags representing the desired execution behavior of the service. One or more of the following flags can be set:

§ Status

uint32_t _ci_srvargs::Status

The status parameter contains the service status as detected by the Net Control service callback function that initiates the service with NETTOOLS. The value of status should be initialized to NULL. Its defined values are:

§ ReportCode

uint32_t _ci_srvargs::ReportCode

All the services available via the configuration can also be launched directly via a NETTOOLS API. The NETTOOLS service API has a standard service reporting callback function that is mirrored by the configuration system via the Net Control service provider callback. This variable holds the last report code reported by the NETTOOLS service invoked by this configuration entry.

§ IfIdx

uint32_t _ci_srvargs::IfIdx

This is the physical device Index (1 to n) on which the service is to be executed. For example, when launching a DHCP server service, the physical interface is that connected to the home network. For more generic services (like Telnet), the service can be launched by a pre-defined IP address (or INADDR_ANY as a wildcard). When launching by IP address only, this field is left NULL. If the field is valid, the CIS_FLG_IFIDXVALID flag should be set in Mode.

§ IPAddr

uint32_t _ci_srvargs::IPAddr

This is the IP address (in network format) on which to initiate the service. This IP address can specify the wildcard INADDR_ANY, in which case the service will accept connections to any valid IP address on any device. Note that some services (like DHCP server) do not support being launched by an IP address and require a device Index (supplied in IfIdx) on which to execute.

§ pCbSrv

void(* _ci_srvargs::pCbSrv) (uint32_t Item, uint32_t Status, uint32_t Code, void *hCfgEntry)

Callback for status changes

Parameters
ItemItem value of entry changed
StatusNew status
CodeReport code (if any)
hCfgEntryNon-referenced pointer to entry with status change
Note
Status is the same as the Status field described in the CISARGS structure.
Code is that returned by the NETTOOLS service callback, which is a lower-level status callback function used by Net Control.

The documentation for this struct was generated from the following file:
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale