Host Name Resolution; Ip Status Flags And Bytes - Sony Ericsson Embedded Applications Application Note

Using the on board tcp/ip stack
Table of Contents

Advertisement

2.8

Host Name Resolution

2.9

IP Status Flags and Bytes

LZT 123 8019 R1A
EMBEDDED APPLICATIONS FCT
back-off delay and transmission retries can be adjusted to
suit the application.
This function assumes that the caller has already checked
that the TCP socket is connected, or if not, that the
connection will become active within the timeout/retry
period.
Host name resolution in a script is performed using the
iprh() function. The application-writer should be aware that
the name lookup is effectively a blocking function. The
script interpreter process will be blocked until the lookup is
completed. This can lead to long script processing delays
if something with the name resolution fails.
The name servers used by the lower-level stack are
usually obtained dynamically when a PDP context is
activated. The active settings can be interrogated using
the ipi() function. A DNS lookup has a minimum timeout of
approximately 124 seconds. Hence if all DNS servers are
inaccessible (up to 3 are supported), or if the domain
name does not resolve, there can be an overall delay of
between 125 and 140 seconds before the iprh() function
returns. During this delay script operation will stall,
therefore the use of unreliable DNS servers could cause
long pauses in operation.
There are two status bytes and one status flag associated
with the TCP/IP features. These are interrogated using the
gtb() and gtf() script functions respectively.
The IP status flag APPS_IP_ERROR_TRIGGER (36) is
set whenever an error occurs in the lower level IP system.
The flag remains set until it is read, and is reset upon
reading. The error that gave rise to the flag is obtained by
reading the status byte APPS_IP_ERROR_STATUSBYTE
(13). If several IP errors occur before the status flag is set
the last error will be reported in the status byte.
The TCP system has a separate status byte called
APPS_IP_TCPSTATUS_BYTE (14) which reports the
current status of the TCP connection. This status can
indicate that TCP is not-connected, connecting, or
connected.
15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents