Determining Addresses and Ports

The destination address and port are a specific IP address and port if the data flow is unicast. If the data flow is by way of a multicast group, the destination address and port are for a multicast group. Generally, address and port determination depends upon the protocol to be used to send and receive the data stream.

If the data flow is for the TCP protocol, the usual listen() - connect() - accept() sequence can be done by server and client. Then the IP address and port for each end of the connection are available using the getsockname() and getpeername() calls.

If the data flow is for UDP unicast or multicast, agreement about IP addresses and ports may have to be done externally to the RSVP protocol or the UDP protocol. This would depend upon the application. For example, it might be necessary ahead of time to agree upon a multicast address and port to use for a video broadcast.

When joining a multicast group as a receiver, it is possible to see path messages to that group which are coming from senders. Then a receiver can make reservations for data flows from the senders. A path message includes the IP address and port of the sender.

RSVP is designed to use a variety of network address types. Thus the API uses the more general sockaddr structure. To operate with Internet Protocol addresses, the sockaddr structure must be cast to sockaddr_in.


[Back: Using the RSVP API]
[Next: Starting a Session]