Subject: [Tsvwg] Fwd: How do I bind multiple IPs to an sctp socket using sctp_binx()?

From: Lyndon Ong <[email-masked]>
Date: Thu, 4 Oct 2001 13:37:41 -0700 (PDT)

--- Patrick Lam <[email-masked]> wrote:
> Date: Thu, 04 Oct 2001 12:06:53 -0700
> From: Patrick Lam <[email-masked]>
> To: "sigtran" <[email-masked]>
> Subject: How do I bind multiple IPs to an sctp
> socket using sctp_binx()?
> Reply-to: [email-masked]
> 
> Hi:
> 
> If I have 2 IP addresses (in  sockaddr_in format) to
> bind to a sctp
> socket, how do I fill out the sockaddr_storage stuct
> with those IP
> address?
> 
> Can someone please give me some sample code on how
> this is done?  Or a
> pointer to some of those sample codes (maybe for IP6
> implemntations??)?
> 
> Thanks very much in advance,
> 
> Patrick.
> 
> 
> 
> ---
> You are currently subscribed to sigtran as:
> [email-masked]
> To unsubscribe send a blank email to
[email-masked]

__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

_______________________________________________
tsvwg mailing list
[email-masked]
http://www1.ietf.org/mailman/listinfo/tsvwg

---

From: "Daisy Chang" <[email-masked]>
Date: Fri, 5 Oct 2001 10:35:47 -0500

Hi,
     I happened to have written a testcase for bindx() the other day

Thanks,
Daisy

Daisy Chang
IBM Linux Technology Center
[email-masked]
Tel: (512)-838-4194    T/L: 678-4194
FAX: (512)-838-4663

Lyndon Ong <[email-masked]>@ietf.org on 10/04/2001 03:37:41 PM

Sent by:  [email-masked]

To:   [email-masked]
cc:
Subject:  [Tsvwg] Fwd: How do I bind multiple IPs to an sctp socket using
      sctp_binx()?

__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month.
http://geocities.yahoo.com/ps/info1

---

From: "Daisy Chang" <[email-masked]>
Date: Fri, 5 Oct 2001 10:54:10 -0500

Hi,
     I'm sorry about the broken message that I accidentally sent out a
minute ago. I hit the wrong key at the wrong time.
     I simply would like to point you to a testcase that I have written the
other day, hoping that it could give you some ideas on how to do this. This
testcase has been submitted as a patch to the Linux Kernel SCTP (lksctp)
project on SourceForge - http://sourceforge.net/projects/lksctp. This is
included in patch #466155 - Initial bindx support. The following is an
extract from the testcase where the bindx is called. I hope it helps!

  struct sockaddr_storage bindx_addr[BINDX_ADDR_COUNT];
  struct sockaddr_storage *bap;
       .
       .

  /* Add two more addresses, eth0 and eth1, to be bound to sk1 in addition to loopback */
  bap = bindx_addr;
  ((struct sockaddr_in *)bap)->sin_family = AF_INET;
  ((struct sockaddr_in *)bap)->sin_addr.s_addr = SCTP_ADDR_ETH0;
  ((struct sockaddr_in *)bap)->sin_port = htons(SCTP_TESTPORT_1);

  bap++;
  ((struct sockaddr_in *)bap)->sin_family = AF_INET;
  ((struct sockaddr_in *)bap)->sin_addr.s_addr = SCTP_ADDR_ETH1;
  ((struct sockaddr_in *)bap)->sin_port = htons(SCTP_TESTPORT_1);

  if (test_bindx(sk1, bindx_addr, BINDX_ADDR_COUNT, SCTP_BINDX_ADD_ADDR)) {
          /* check error..... */
  }

Thanks,
Daisy

Daisy Chang

To:   [email-masked]
cc: