SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] modifying SCTP_message structure


Chronological Thread 
  • From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
  • To: amar deka <amar_nitw2000 AT yahoo.co.in>
  • Cc: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] modifying SCTP_message structure
  • Date: Sun Mar 20 09:42:01 2005
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi,

see my comments in-line.

Best regards
Michael

On Mar 20, 2005, at 8:43 Uhr, amar deka wrote:

hi all

I tried to modify the "SCTP_message" structute in
messages.h
by
typedef struct SCTP_MESSAGE
{
SCTP_common_header common_header;
guchar sctp_pdu[MAX_SCTP_PDU];
guchar my_data[MY_DATA_SIZE];
}
SCTP_message;
This is not a valid SCTP packet. Therefore none of the
internal routines will be prepared to handle it.
so that i can add some data to the SCTP message
calculated over the original message.
then i tried to modify
mdi_send_message() in distribution.c by adding
..
..
char data[MY_DATA_SIZE]="skkkksjsij........";
.
.
memcpy(message->my_data,data,MY_DATA_SIZE);

..
before the line
aux_insert_checksum((unsigned char *) message,
length);

...
then i tried to receive the message->mydata from

mdi_receiveMessage()

in a char buffer by
buffer=(char*)message->my_data;
and tried to print it.
all i get is a garbage.

what may be the problem?
See above.
Another question ...
if i have to add a new control chunk and manipulate it
It depends on the control chunk. If some of the existing control
chunks is similar to your new one, try to figure out how it is
handled in the sctplib.

what steps should i follow??
SOS plz
amar



_______________________________________________________________________ _
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
_______________________________________________
discussion mailing list
discussion AT sctp.de
http://www.sctp.de/mailman/listinfo/discussion






Archive powered by MHonArc 2.6.19+.

Top of page