API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

INETMGR_GETOPT()

Brew Release
Brew MP 1.0.2
See Also
INETMGR_SetOpt() AEEUDPUrgent
Description
This function provides the ability to query certain network options. It is similar in paradigm to ISOCKET_IOCtl(), but deals more with network-level configurables, rather than socket-level configurables.
Params
pINetMgr
[in]:
Pointer to the INetMgr Interface to be used to retrieve network options
nOptName
[in]:
integer identifying which option to get
pOptVal
[out]:
Filled with option-specific data
pnOptSize
[]:
[in/out] : if pOptVal is non-NULL, on input specifies size of pOptVal, which must match the required size of the option data. if pOptVal is NULL, on input is ignored, on output holds the required size of the option data.
Interface
  • INETMGR
Prototype
  •     int INETMGR_GetOpt
        (
        INetMgr *pINetMgr,
        int nOptName,
        void *pOptVal,
        int *pnOptSize
        );
    
Return
  • SUCCESS: if the option was retrieved EPRIVLEVEL: if access to the option is prohibited by applet privilege EUNSUPPORTED: if nOptName is unknown EBADPARM: if pOptVal is non-null and pnOptSize is set to something smaller than necessary to hold the fixed-length option data
    other error, depending on the option
Side Effect
  • Depend on the option
Comments
Currently supported option ids are: - INET_OPT_DEF_RLP3: default RLP settings, pOptVal must be an AEERLP3Cfg - INET_OPT_CUR_RLP3: current RLP settings, pOptVal must be an AEERLP3Cfg - INET_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. - INET_OPT_DNS_SERVERS: retrieve the system's configured DNS servers, pOptVal must be an array of INAddr. pnOptSize is set to the number of bytes filled in pOptVal. If pnOptSize passed in is less than 4 (size of 1 INAddr), pnOptSize is set to 0 and SUCCESS is returned. - INET_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. - INET_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. - INET_OPT_DEFAULT_NET: obtain the default network (AEE_NETWORK_*); pOptVal must be a pointer to an int - INET_OPT_UMTS_COUNT: obtain the number of Packet Data Profiles (UMTS only); pOptVal must be a pointer to an uint16 - INET_OPT_UMTS_INFO(pdp): obtain the profile information for a given Packet Data Profile number (UMTS only); pOptVal must be a pointer to an AEEUMTSInfo - INET_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. - INET_OPT_LAST_NET_DOWN_REASON: obtain the last network down reason. Typically called by the application when the data network is CLOSED. pOptVal must be a pointer to a AEENetDownReason. Introduced BREW Client 3.1.4 SP1