在3.x linux内核中,内核和uapi对sctp状态的定义不同。这是不匹配还是我遗漏了什么?
在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;
并且看起来SCTP_STATE_EMPTY已被此修补程序删除:http://lists.openwall.net/netdev/2011/04/20/31
我在sctp开发邮件列表上发布了这个问题,内核开发人员确认这是不匹配的。
希望这个问答对其他人来说仍然有价值,所以我自己回答了