Class: FFI::Packets::Tcp::Opt

Inherits:
Struct
  • Object
show all
Includes:
DRY::NetStructHelper
Defined in:
lib/ffi/packets/tcp.rb

Overview

TCP option (following TCP header)

struct tcp_opt {
   uint8_t        opt_type;  /* option type */
   uint8_t        opt_len;   /* option length >= TCP_OPT_LEN */
   union tcp_opt_data {
     uint16_t    mss;           /* TCP_OPT_MSS */
     uint8_t        wscale;     /* TCP_OPT_WSCALE */
     uint16_t    sack[19];      /* TCP_OPT_SACK */
     uint32_t    echo;          /* TCP_OPT_ECHO{REPLY} */
     uint32_t    timestamp[2];  /* TCP_OPT_TIMESTAMP */
     uint32_t    cc;            /* TCP_OPT_CC{NEW,ECHO} */
     uint8_t        cksum;      /* TCP_OPT_ALTSUM */
     uint8_t        md5[16];    /* TCP_OPT_MD5 */
     uint8_t        data8[TCP_OPT_LEN_MAX - TCP_OPT_LEN];
   } opt_data;
} __attribute__((__packed__));

Defined Under Namespace

Modules: Otype

Constant Summary collapse

TCP_OPT_LEN =
Constants::TCP_OPT_LEN
TCP_OPT_LEN_MAX =
Constants::TCP_OPT_LEN_MAX
DATA_LEN =
TCP_OPT_LEN_MAX - TCP_OPT_LEN