From: Gao, K. <kev...@in...> - 2003-08-25 22:58:54
|
> >=20 > > In spec we know that we can bind more than one address in the=20 > > same chunk. So I think use sockaddr_storage is to bind more than > > one address once. Otherwise, neither sockaddr_in6 nor sockaddr_in > > needs 128 bytes for storage. So based on the syntax of bindx. > > I think use sockaddr_storage as parameter is more reasonable >=20 > Even with sockaddr *, we can bind more than one address. >=20 > looks like you are confusing between the real sctp_bindx() API in the > library: tools/src/lib/bindx.c:sctp_bindx() and the > kernel routine in net/sctp/socket.c. The kernel routine is=20 > not used as=20 > reflected by the comments and it can be removed, but it was=20 > left so that it > may be used in future if we want to implement bindx as a=20 > system call. I don't > think this will happen as it requires changes to the core=20 > networking data=20 > structures and routines. For ex: bindx() has to be added to=20 > struct proto. As > SCTP is the only current user of bindx(), it is tough to=20 > convince the nw > maintainers to make this change. So we decided on a library=20 > interface using > setsockopt().=20 >=20 > I hope this will help in clarifying your other issues too. >=20 > Thanks > Sridhar >=20 >=20 Yes, I know your mean, it's clear. But I still find in sctp/net/sctp/socket.c There is another sctp_bindx function to do the same functionality as bindx function in sctp_setsockopt(). But is there any using for this function "sctp_bindx" in socket.c. If none, why not remove these redundant code? Thanks. -Kevin |