Skip to content
Snippets Groups Projects
Commit eda59ca8 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Add support for SCTP_INTERLEAVING_SUPPORTED socket option.

This is untested, since the kernel doesn't support it yet...
parent e9346a30
No related branches found
No related tags found
No related merge requests found
......@@ -2517,7 +2517,7 @@ sctp_initmsg
sctp_assocval
: '{' ASSOC_VALUE '=' INTEGER '}' {
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
$$ = new_expression(EXPR_SCTP_ASSOCVAL);
if (!is_valid_u32($4)) {
semantic_error("assoc_value out of range");
......
......@@ -1645,7 +1645,7 @@ static int syscall_setsockopt(struct state *state, struct syscall_spec *syscall,
} else if (val_expression->type == EXPR_SCTP_INITMSG) {
optval = &val_expression->value.sctp_initmsg;
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
} else if (val_expression->type == EXPR_SCTP_ASSOCVAL) {
optval = &val_expression->value.sctp_assoc_value;
#endif
......
......@@ -71,7 +71,7 @@ struct expression_type_entry expression_type_table[] = {
#ifdef SCTP_INITMSG
{ EXPR_SCTP_INITMSG, "sctp_initmsg"},
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
{ EXPR_SCTP_ASSOCVAL, "sctp_assocvalue"},
#endif
#ifdef SCTP_DELAYED_SACK
......@@ -292,7 +292,7 @@ void free_expression(struct expression *expression)
#ifdef SCTP_INITMSG
case EXPR_SCTP_INITMSG:
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
case EXPR_SCTP_ASSOCVAL:
#endif
#ifdef SCTP_DELAYED_SACK
......@@ -522,7 +522,7 @@ static int evaluate(struct expression *in,
sizeof(in->value.sctp_initmsg));
break;
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
case EXPR_SCTP_ASSOCVAL: /* copy as-is */
memcpy(&out->value.sctp_assoc_value,
&in->value.sctp_assoc_value,
......
......@@ -51,7 +51,7 @@ enum expression_t {
#ifdef SCTP_INITMSG
EXPR_SCTP_INITMSG, /* struct sctp_initmsg for SCTP_INITMSG */
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
EXPR_SCTP_ASSOCVAL, /* struct sctp_assoc_value */
#endif
#ifdef SCTP_DELAYED_SACK
......@@ -86,7 +86,7 @@ struct expression {
#ifdef SCTP_INITMSG
struct sctp_initmsg sctp_initmsg;
#endif
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST)
#if defined(SCTP_MAXSEG) || defined(SCTP_MAX_BURST) || defined(SCTP_INTERLEAVING_SUPPORTED)
struct sctp_assoc_value sctp_assoc_value;
#endif
#ifdef SCTP_DELAYED_SACK
......
......@@ -86,6 +86,9 @@ struct int_symbol platform_symbols_table[] = {
{ SCTP_DELAYED_SACK, "SCTP_DELAYED_SACK" },
{ SCTP_MAX_BURST, "SCTP_MAX_BURST" },
{ SCTP_STATUS, "SCTP_STATUS" },
#if defined(SCTP_INTERLEAVING_SUPPORTED)
{ SCTP_INTERLEAVING_SUPPORTED, "SCTP_INTERLEAVING_SUPPORTED" },
#endif
{ SCTP_CLOSED, "SCTP_CLOSED" },
{ SCTP_BOUND, "SCTP_BOUND" },
{ SCTP_LISTEN, "SCTP_LISTEN" },
......
......@@ -120,6 +120,9 @@ struct int_symbol platform_symbols_table[] = {
#endif
#ifdef SCTP_STATUS
{ SCTP_STATUS, "SCTP_STATUS" },
#endif
#if defined(SCTP_INTERLEAVING_SUPPORTED)
{ SCTP_INTERLEAVING_SUPPORTED, "SCTP_INTERLEAVING_SUPPORTED" },
#endif
{ SCTP_CLOSED, "SCTP_CLOSED" },
#if 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment