Skip to content
Bytefield templates

TCP segment header

Classic TCP header layout — 32-bit columns, source/dest ports, sequence and ack numbers, flags strip and window size.

Template previewBytefield
Rendering…

Make it your own.

(defattrs :bg-yellow {:fill "#fef3c7"})
(defattrs :bg-blue {:fill "#dbeafe"})
(defattrs :bg-pink {:fill "#fce7f3"})

(draw-column-headers)

(draw-box "Source Port" {:span 2})
(draw-box "Destination Port" {:span 2})

(draw-box "Sequence Number" {:span 4})

(draw-box "Acknowledgment Number" {:span 4})

(draw-box "Data Off." [:bg-yellow])
(draw-box "Reserved")
(draw-box "Flags" [:bg-pink])
(draw-box "Window" [:bg-blue])

(draw-box "Checksum" {:span 2})
(draw-box "Urgent Pointer" {:span 2})

(draw-box "Options" [:bg-yellow {:span 4}])

(draw-gap "Payload data")

(draw-bottom)