The rapi_sender() call tells RSVP that the program will be a sender. This call establishes the sender address and port for the data flow, and it specifies the characteristics of the data stream in RSVP terms, with a tspec (transmission specification). This information will go to the destination in an RSVP path message. The RSVP API will take care of repeating the message as needed according to the RSVP protocol.
This example shows the use of rapi_sender():
int retcode; struct sockaddr_in senderAddr; /* sender address, port, protocol */ rapi_tspec_t sndTSpec; /* set up senderAddr and sndTSpec */ senderAddr.sin_family = AF_INET; senderAddr.sin_addr.s_addr = inet_addr("129.5.24.1"); senderAddr.sin_port = htons(1024); /* set the object size and form in the object header */ sndTSpec.len = sizeof(sndTSpec); sndTSpec.form = RAPI_FORMAT_IS_GEN; /* fill in the body of the Tspec object */ sndTSpec.tspec_r = 100000; sndTSpec.tspec_b = 2600; sndTSpec.tspec_p = 100000; sndTSpec.tspec_m = 1300; sndTSpec.tspec_M = 1300; retcode = rapi_sender( sessID, /* Session ID */ 0, /* Flags - not defined */ (struct sockaddr *)&senderAddr, /* Local host: (Src addr, port), net order */ NULL, /* Sender template - not supported */ &sndTSpec, /* Sender tspec */ NULL, /* Sender adspec - not supported */ NULL, /* Sender policy data - not supported */ ttl /* TTL of multicast session (if multicast) */ ); if (retcode) printf("rapi_sender() error %d\n", retcode);