All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: Error when build apps SCTP
Date: Wed, 23 Mar 2011 01:12:26 +0000	[thread overview]
Message-ID: <4D8948FA.6000800@cn.fujitsu.com> (raw)
In-Reply-To: <1300785083.2391.10.camel@thanh.pc>


> Hi,my name Thanh Nguyen.Student of University of Science Ho Chi Minh
> City Viet Nam.I have one problem with SCTP API.
> I have source code one example client server SCTP. (Attach).But when
> build with gcc (using command gcc client.c -o client) was error as:
> "'union sctp_notification’ has no member named ‘sn_types’
> And I check struct sctp_notification but sn_types is member of this
> struct.Why error?
> If you have example same it, and paper abount SCTP API.Please send to
> me.Thanks a lot.
> Source example,I take it from Oracle example.Code server build ok.
> I have install LKSCTP, Fedora 13,GCC.  

It should be 'snp->sn_header.sn_type', not 'snp->sn_types'.

See the socket API: http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-27

Section 6.1.  SCTP Notification Structure

   union sctp_notification {
     struct sctp_tlv {
       uint16_t sn_type; /* Notification type. */
       uint16_t sn_flags;
       uint32_t sn_length;
     } sn_header;
     struct sctp_assoc_change sn_assoc_change;
     struct sctp_paddr_change sn_paddr_change;
     struct sctp_remote_error sn_remote_error;
     struct sctp_send_failed sn_send_failed;
     struct sctp_shutdown_event sn_shutdown_event;
     struct sctp_adaptation_event sn_adaptation_event;
     struct sctp_pdapi_event sn_pdapi_event;
     struct sctp_authkey_event sn_auth_event;
     struct sctp_sender_dry_event sn_sender_dry_event;
     struct sctp_send_failed_event sn_send_failed_event;
   };




      reply	other threads:[~2011-03-23  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22  9:11 Error when build apps SCTP Thanh Nguyen
2011-03-23  1:12 ` Wei Yongjun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8948FA.6000800@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.