0

In the 3.x linux kernel, the sctp states are defined differently between kernel and uapi. Is that a mismatch or am I missing something?

in include/uapi/linux/sctp.h

/* Association states.  */
enum sctp_sstat_state {
    SCTP_EMPTY                = 0,
    SCTP_CLOSED               = 1,
    SCTP_COOKIE_WAIT          = 2,
    SCTP_COOKIE_ECHOED        = 3,
    SCTP_ESTABLISHED          = 4,
    SCTP_SHUTDOWN_PENDING     = 5,
    SCTP_SHUTDOWN_SENT        = 6,
    SCTP_SHUTDOWN_RECEIVED    = 7,
    SCTP_SHUTDOWN_ACK_SENT    = 8,
};

in include/net/sctp/constants.h

/* SCTP state defines for internal state machine */
typedef enum {  

        SCTP_STATE_CLOSED               = 0,
        SCTP_STATE_COOKIE_WAIT          = 1,
        SCTP_STATE_COOKIE_ECHOED        = 2,
        SCTP_STATE_ESTABLISHED          = 3,
        SCTP_STATE_SHUTDOWN_PENDING     = 4,
        SCTP_STATE_SHUTDOWN_SENT        = 5,
        SCTP_STATE_SHUTDOWN_RECEIVED    = 6,
        SCTP_STATE_SHUTDOWN_ACK_SENT    = 7,

} sctp_state_t;

and it looks like the SCTP_STATE_EMPTY was removed by this patch: http://lists.openwall.net/netdev/2011/04/20/31

tristan
  • 4,235
  • 2
  • 21
  • 45

1 Answers1

0

I posted the question on the sctp development mailing list and kernel developer confirmed that this is a mismatch.

hoping this Q/A is still of some value for others so I answered it myself

tristan
  • 4,235
  • 2
  • 21
  • 45