SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] New Be Question


Chronological Thread 
  • From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
  • To: mrader AT comcast.net
  • Cc: sctp-discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] New Be Question
  • Date: Tue, 2 Sep 2008 18:36:26 +0200
  • List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
  • List-id: SCTP Discussions <sctp-discussion.sctp.de>

Hi Mark,

the communicationUpNotif() gets called with the assocID provided as the first parameter.
So you (in the callback) get it.

The communicationUpNotif() prints the assocID if verbose it true (from the echo_server.c)

void* communicationUpNotif(unsigned int assocID, int status,
unsigned int noOfDestinations,
unsigned short noOfInStreams, unsigned short noOfOutStreams,
int associationSupportsPRSCTP, void* dummy)
{
struct ulp_data *ulpDataPtr;

if (verbose) {
fprintf(stdout, "%-8x: Communication up (%u In-Streams, %u Out-Streams)\n", assocID, noOfInStreams, noOfOutStreams);
fflush(stdout);
}

ulpDataPtr = (ulp_data*)malloc(sizeof(struct ulp_data));
ulpDataPtr->maximumStreamID = noOfOutStreams - 1;
return((void *) ulpDataPtr);
}

That is the way your code gets it.

Best regards
Michael


On Sep 2, 2008, at 4:19 PM,
mrader AT comcast.net
wrote:

Yes I am. I borrowed heavily from the echo_server code to start. the implimentation. The communicationUpNotif() function takes several arguments. but does it return the assocID or does it set it in a pass by reference.

Mark Rader

--
If you think dogs can't count, try putting three dog biscuits in your pocket and then give him only two of them.
**-Phil Pastoret**

-------------- Original message --------------
From: Michael Tuexen
<Michael.Tuexen AT micmac.franken.de>

> Hi Mark,
>
> which API are you using? I assume that you are using the sctplib API,
> since
> this is the list to support that implementation.
>
> When an association is established, the communicationUpNotif() will be
> called.
> The assocID is the first parameter.
>
> Best regards
> Michael
>
> On Sep 1, 2008, at 11:30 PM, Mark Rader wrote:
>
> > Hello.
> >
> > I am trying to set up a special purpose SCTP server. I need to get
> > the association ID on the server side which created after the client
> > makes contact. How can I do this?
> >
> > Mark Rader
> > _______________________________________ ________
> > sctp-discussion mailing list
> >
sctp-discussion AT sctp.de
> > http://www.sctp.de/mailman/listinfo/sctp-discussion
>





Archive powered by MHonArc 2.6.19+.

Top of page