2017-11-13 03:22:14 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* include/netinet/tcp.h
|
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2017-11-13 03:22:14 +08:00
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2017-11-13 03:22:14 +08:00
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2017-11-13 03:22:14 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __INCLUDE_NETINET_TCP_H
|
|
|
|
#define __INCLUDE_NETINET_TCP_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
2018-03-13 00:59:46 +08:00
|
|
|
/* Per OpenGroup.org:
|
|
|
|
*
|
|
|
|
* "The netinet/tcp.h header shall define the following macro for use as a
|
|
|
|
* socket option at the IPPROTO_TCP level:" -- OpenGroup.org
|
2017-11-13 03:22:14 +08:00
|
|
|
*/
|
|
|
|
|
2018-03-13 00:59:46 +08:00
|
|
|
#define TCP_NODELAY (__SO_PROTOCOL + 0) /* Avoid coalescing of small segments. */
|
2017-11-13 03:22:14 +08:00
|
|
|
|
2018-03-13 00:59:46 +08:00
|
|
|
/* "The macro shall be defined in the header. The implementation need not
|
2021-02-03 16:42:38 +08:00
|
|
|
* allow the value of the option to be set via setsockopt() or retrieved
|
|
|
|
* via getsockopt()."
|
2017-11-13 03:22:14 +08:00
|
|
|
*/
|
|
|
|
|
2018-03-13 00:59:46 +08:00
|
|
|
/* Additional TCP protocol socket operations not specified at OpenGroup.org */
|
2021-02-03 16:42:38 +08:00
|
|
|
|
2018-03-13 00:59:46 +08:00
|
|
|
/* TCP protocol socket operations needed to support TCP Keep-Alive: */
|
|
|
|
|
|
|
|
#define TCP_KEEPIDLE (__SO_PROTOCOL + 1) /* Start keeplives after this IDLE period
|
|
|
|
* Argument: struct timeval */
|
|
|
|
#define TCP_KEEPINTVL (__SO_PROTOCOL + 2) /* Interval between keepalives
|
|
|
|
* Argument: struct timeval */
|
|
|
|
#define TCP_KEEPCNT (__SO_PROTOCOL + 3) /* Number of keepalives before death
|
|
|
|
* Argument: max retry count */
|
2019-11-17 21:37:12 +08:00
|
|
|
#define TCP_MAXSEG (__SO_PROTOCOL + 4) /* The maximum segment size */
|
2018-03-13 00:59:46 +08:00
|
|
|
|
2017-11-13 03:22:14 +08:00
|
|
|
#endif /* __INCLUDE_NETINET_TCP_H */
|