Add comments to the tcp flags.

This commit is contained in:
christos 2019-11-01 13:54:59 +00:00
parent eb963c3b8a
commit 61aae00bd3

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp.h,v 1.33 2017/01/10 20:32:27 christos Exp $ */
/* $NetBSD: tcp.h,v 1.34 2019/11/01 13:54:59 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -61,14 +61,14 @@ struct tcphdr {
th_x2:4; /* (unused) */
#endif
uint8_t th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02
#define TH_RST 0x04
#define TH_PUSH 0x08
#define TH_ACK 0x10
#define TH_URG 0x20
#define TH_ECE 0x40
#define TH_CWR 0x80
#define TH_FIN 0x01 /* Final: Set on the last segment */
#define TH_SYN 0x02 /* Synchronization: New conn with dst port */
#define TH_RST 0x04 /* Reset: Announce to peer conn terminated */
#define TH_PUSH 0x08 /* Push: Immediately send, don't buffer seg */
#define TH_ACK 0x10 /* Acknowledge: Part of connection establish */
#define TH_URG 0x20 /* Urgent: send special marked segment now */
#define TH_ECE 0x40 /* ECN Echo */
#define TH_CWR 0x80 /* Congestion Window Reduced */
uint16_t th_win; /* window */
uint16_t th_sum; /* checksum */
uint16_t th_urp; /* urgent pointer */