User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 147
R
R
S
S
9
9
1
1
1
1
0
0
-
-
N
N
-
-
1
1
1
1
-
-
2
2
2
2
/
/
2
2
4
4
/
/
2
2
8
8
S
S
o
o
f
f
t
t
w
w
a
a
r
r
e
e
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
V
V
e
e
r
r
s
s
i
i
o
o
n
n
4
4
.
.
1
1
5
5
Structure Member
Name
Description
aMacAddr
MAC address of RS9110-N-11-2X
module
aNetMask
Subnet mask with which the TCP/IP
stack is configured.
aDefaultGateway
Default gateway with which the TCP/IP
stack is configured.
uErrorCode
0 – Success
-100: DHCP handshake failure
-4 : IP configuration failed
-131:If parameters other than 0
or 1 is given for set IP parameters
command.
4.10.2 Open a Socket
Description
This command opens a TCP/UDP client socket, a Listening TCP/UDP socket or a
multicast socket. This command enables the TCP/IP stack to perform the
corresponding action on opening a socket.
On opening a TCP client socket, the TCP/IP stack tries to connect to the specified
TCP peer and gives the response to the user.
On opening a UDP (client/server) socket, the TCP/IP stack returns the socket ID
created immediately since there is no handshake required for UDP.
On opening a TCP server socket, the TCP/IP stack returns the socket ID created
immediately and waits for the connections on the specified ports from peers.
Relevance
This command is relevant only when the TCP/IP stack is enabled.
Frame Body
struct in_addr1
{
UINT8 s_addr[4];
};
struct sockaddr_in
{