Socket_Bind - bind()
In: R0 = Socket descriptor
R1 = Pointer to local address to bind socket to
R2 = Size of local address
Out: R0 corrupted
This call binds a socket to a specified local address. The format of the address (for Internet addresses) is:
R1 + 0 = Address family
2 = Port number
4 = IP address
8 = Reserved (should be zero)
The address family is always AF_INET for internet addresses. The reserved portion of the address can be omitted, provided that the address size is passed correctly to indicate this.
Note that the port number and IP address need to be in network byte order, which is the reverse of the normal byte order on all current Acorn machines.
|
|
|