Re: SCTP is in the Tree :-)

From: Randall Stewart <rrs_at_cisco.com>
Date: Thu, 09 Nov 2006 12:12:46 -0500
Ruslan Ermilov wrote:
> On Thu, Nov 09, 2006 at 08:28:38AM -0500, Randall Stewart wrote:
> 
>>If you look on one of my postings.. I actually want to
>>verify where to place man pages.. I don't have a
>>sctp(4).. which is a GREAT idea..
>>
>>But I do have
>>
>>sctp_sendmsg(2)
>>sctp_recvmsg(2)
>>sctp_send(2)
>>
> 
> What are they?  I can only find
> 
> src/sys/netinet/sctp_uio.h:ssize_t sctp_sendmsg
> 
> when word-searching for "sctp_sendmsg".  If these are
> some new syscalls, then they need to be implemented
> first, then added to libc, and then the manpages should
> go to src/lib/libc/sys/. 

Well.. actually they are syscalls.. but not
obvious that way.. since you need libsctp.a/so
which I asked about also in a previous email :-0

Basically we implement a generic form of the
syscall and then in libsctp.a there
is the actual syscall... aka the wrapper that
does:

ssize_t
sctp_recvmsg (int s,
	      void *dbuf,
	      size_t len,
	      struct sockaddr *from,
	      socklen_t *fromlen,
	      struct sctp_sndrcvinfo *sinfo,
	      int *msg_flags)
{

#ifdef SYS_sctp_generic_recvmsg
	struct iovec iov[2];
	iov[0].iov_base = dbuf;
	iov[0].iov_len = len;
	return (syscall(SYS_sctp_generic_recvmsg, s,
			iov, 1, from, fromlen, sinfo, msg_flags));
#else
...
#endif

For example.. ..

These are all fun things from the socketapi..
(see my post .. something about looking for a home
as the subject line).


  If they are functional wrappers
> around existing syscalls (sendmsg(2) etc.), then the
> wrapping code and manpages should go into libc/net/,
> and section should be 3 and not 2.  If they're something
> else, well... tell me what they are supposed to be.  ;)
> 

Well.. I guess they are functional wrappers.. since
the syscall is a generic one so that way if the ietf
someday makes a syscall with an iov then we have it
already :-)

> 
>>And maybe one other that I am not remembering this
>>early without a cup of coffee..
>>
>>Can I just put these in the doc tree under man2.. and man4
>>(assuming I write sctp(4))? (after of course getting
>>gnn's approval).. or is there some other process to
>>check documents in?
>>
> 
> sctp(4) should go where tcp(4) currently lives, and
> should preferably have the same structure.

I will work on getting this built ... but it will
be a long airplane ride (maybe tommorrow) before
I can get to it I think :-)

R
> 
> 
> Cheers,


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 803-317-4952 (cell)
Received on Thu Nov 09 2006 - 16:35:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:02 UTC