Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - sctp port: (5 Items)
   
sctp port  
I understand there's an internal sdk called l3/l4 for interfacing into ip or ethernet side of the stack for additional 
protocols.

On the other side, can someone give an overview of how I hook up socket functions to the io-pkt resource manager 
interface?  Do I need to create my own resource manager interface/client-lib for a new protocol even if it uses socket 
based interface?

RE: sctp port  
Hi Michael:
	The L3/L4 interfaces that you've mentioned probably refer to our
QNET L3/L4 layers and aren't related to protocol processing inside of the
stack.

I believe that you could modify the existing socket library to add in the
SCTP functionality and this would likely be easier than writing your own
resource manager interface, but I believe that it's still quite difficult to
do.  Never having done it myself, I'll defer to Sean to comment.

	Robert.

-----Original Message-----
From: Michael Li [mailto:mikeqnx@gmail.com] 
Sent: Thursday, May 15, 2008 8:27 PM
To: ionetmig-networking
Subject: sctp port

I understand there's an internal sdk called l3/l4 for interfacing into ip or
ethernet side of the stack for additional protocols.

On the other side, can someone give an overview of how I hook up socket
functions to the io-pkt resource manager interface?  Do I need to create my
own resource manager interface/client-lib for a new protocol even if it uses
socket based interface?



_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post8160
Re: RE: sctp port  
I have the backend socket api implementation for the protocol but I need to hook it up to io-pkt so that the user space 
socket api functions (with the proper protocol number) are routed to my functions.

In the function "l4_driver_init_ip_iopkt", I see that qnet appends it's own protosw struct to the end of the default 
inet protocols (inetsw).  So to add a new protocol, can I do a similar thing and add to the protocol switch table?
RE: RE: sctp port  
Hi Michael:
	You're definitely getting into quite a very complex area. I can see
that hooking in your protocol into the stack, but this won't necessarily
result in the IP stack (which has the resource manager front end to
communicated with libsocket) interacting with your protocol.  QNET includes
it's own resource manager layer to interact with the application space, so
unless your protocol does the same thing (and has a corresponding user lib),
I don't believe that you're going to be able to communicate with anything
outside of the stack process. You'll also need to map the socket(domain,
type, proto) to the sctp proto which qnet doesn't handle.  Try looking at
pffindproto(), pffinddomain() in kern/uipc_domain.c.

This gets pretty complicated pretty quickly since you're talking about
integrating in with our socket resource manager layer as opposed to
supplying your own (or, I think you are).  It's not something that we
recommend....

	Robert.  

-----Original Message-----
From: Michael Li [mailto:mikeqnx@gmail.com] 
Sent: Tuesday, May 27, 2008 6:38 PM
To: ionetmig-networking
Subject: Re: RE: sctp port

I have the backend socket api implementation for the protocol but I need to
hook it up to io-pkt so that the user space socket api functions (with the
proper protocol number) are routed to my functions.

In the function "l4_driver_init_ip_iopkt", I see that qnet appends it's own
protosw struct to the end of the default inet protocols (inetsw).  So to add
a new protocol, can I do a similar thing and add to the protocol switch
table?

_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post8495
Re: RE: sctp port  
> I have the backend socket api implementation for the protocol but I need to 
> hook it up to io-pkt so that the user space socket api functions (with the 
> proper protocol number) are routed to my functions.
> 
> In the function "l4_driver_init_ip_iopkt", I see that qnet appends it's own 
> protosw struct to the end of the default inet protocols (inetsw).  So to add a
>  new protocol, can I do a similar thing and add to the protocol switch table?

Actually, if we are talking about sctp, then things are a little better.

SCTP is riding on IP, do you don't need to create new domains. You can do similar thing as the "l4_driver_init_ip_iopkt"
 doing, create your own protocol switch, and "hook it in".

If I remember correct, SCTP is probably a little more complicate then the QNET. In that it needs more entries (not just 
one) in protosw (SOCK_DGRAM, SOCK_STREAM, and maybe SOCK_SEQPACKET); Also I  am not sure if it still true, but think the
 SCTP require their protosw being "pluged" into proper place, instead of just add at the end of the original protosw. 
But these are all do able, you just entend the exist protosw, memmove() a few entries to open the space, and copy your 
sctp protosw in.

Also don't forget to modify ip_proto[] table so income packet will goes to SCTP.

This is pretty much all you have to do, and libsocket should be able to working with your SCTP just fine. Their might be
 a few "gocha" you have to work around. (the "peeloff" comes in mind)