Developer

API Reference

INetwork_GetOpt()

Brew Release
Brew MP 1.0.2
See Also
Error Codes INetwork
Description
This function provides the ability to query certain network options. It is similar in paradigm to ISockPort_IOCtl(), but deals more with network-level configurations.
Parameters
  • me
    []:
    the interface pointer.
  • nOptName
    []:
    The option to get.
  • pOptVal
    []:
    Filled with option-specific data. May be NULL.
  • pnOptSize
    []:
    On input, if pOptVal is not NULL, specifies the size of the memory block pointed to by pOptVal. if pOptVal is NULL, it is ignored. On output, holds the size of the filled option-specific data pointed to by pOptVal.
Interface
Prototype
   int INetwork_GetOpt(INetwork *me, int nOptName, void *pOptVal, int *pnOptSize);
Return
AEE_SUCCESS: option was retrieved successfully. AEE_EPRIVLEVEL: if access to the option is prohibited by applet privilege AEE_EUNSUPPORTED: if nOptName is unknown AEE_EBADPARM: if pOptVal is not NULL and pnOptSize is set to something smaller than necessary to hold the option data. Other error code: Depending on the option to get.
Side Effect
None.
Comment
Currently supported option ids are:
- INETWORK_OPT_DEF_RLP3: default RLP settings, pOptVal must be an AEERLP3Cfg
- INETWORK_OPT_CUR_RLP3: current RLP settings, pOptVal must be an AEERLP3Cfg
- INETWORK_OPT_NEG_RLP3: negotiated RLP settings, pOptVal must be an AEERLP3Cfg

  • RLP options: these options are highly device dependent, and as such may not be able
  • to be configured, available, or well-behaved. They are protected by the system privilege
  • level. Note that the Negotiated RLP settings are read-only, and that the Negotiated
  • number of forward/reverse NAK rounds may not be exceeded by the Default nor Current RLP
  • settings. Note also that getting the Current and Negotiated RLP settings only make sense
  • during a data call.

- INETWORK_OPT_PPP_AUTH: retrieve the system's configured PPP authentication
credentials (protected by PL_SYSTEM). pOptVal's type is char *, and the format of the returned string is: "userid\0passwd\0". If the passed-in buffer isn't large enough, the data is truncated, and not null-terminated. pnOptSize is changed only when pOptVal is NULL.
- INETWORK_OPT_UDP_URGENT: obtain info about out-of-band UDP sendto flag.
pOptVal must be a pointer to AEEUDPUrgent struct. bUrgentSupported indicates whether urgent sendto may succeed. bUrgentLimit indicates largest payload which might succeed. Note that applications must list NET_URGENT as an external dependency in their MIF in order to utilize this option.
- INETWORK_OPT_DNS_SERVERS:
returns generic addresses (IPv4/IPv6) of the system's configured DNS servers. pOptVal must be an array of IPAddr. pnOptSize on input indicates the number of bytes allocated and pointed to by pOptVal. On output, pnOptSize is set to the number of bytes filled in pOptVal.
- INETWORK_OPT_HW_ADDR: obtain the hardware address, pOptVal is a
pointer to an array of bytes. The availability and format of a hardware address is very device specific. For example, on a WLAN network, the hardware address is a six-byte MAC address. On a CDMA network, there is no hardware address.
  • Follow