When sending TCP SYN data using Libnet, the options information is generally not set by default, i.e. no MSS and timestamps.
In some IDC rooms, this data is intercepted. The behavior that occurs is that there is no problem using Telnet access, but the libnet sends a SYN packet without responding. The options information needs to be set at the time of the contract. The libnet provides libnet_builf_tcp_options to set up.
Uint8_t payload[20] = {0x00};static int set_options_payload (Uint8_t *payload, UINT32_T TIMEVAL,UINT16_T MSS) { int len = 0; //set mss value payload[len++] = 0x02 ; payload[len++] = 0x04; payload[len++] = ( uint8_t) ((mss >> 8) & 0xff); payload[len++] = ( uint8_t) (MSS & 0XFF); //set sack payload[len++] = 0x04; payload[len++] = 0x02; //set timeval payload[len++] = 0x08; payload[len++] = 0x0a; payload[len++] = (uint8_t) ((Timeval >> 24) & 0xff); payload[len++] = (uint8_t) ( (timeval >> 16) & 0xff); payload[len++] = ( uint8_t) ((timeval >> 8) & 0xff); payload[len++] = (uint8_t) (TIMEVAL & 0XFF); len+=4; //set NOP payload[len++] = 0x01; //set Window scale payload[len++] = 0x03; payload[len++] = 0x03; payload[len] = 0x07; return 0;} R = libnet_build_tcp_options ( payload, 20, l,          0);
Setting options Data Using Libnet_build_tcp_options