Is the TCP sequence number just the ACK number + bytes received? Is it different when doing the 3-way handshake?
Once each device has chosen its ISN, it sends this value to the other device in the Sequence Number field in its initial SYN message. The device receiving the SYN responds with an ACK message acknowledging the SYN (which may also contain its own SYN, as in step #2 of the three-way handshake). In the ACK message, the Acknowledgment Number field is set to the value of the ISN received from the other device plus one. This represents the next sequence number the device expects to receive from its peer; the ISN actually thus represents the sequence number of the last byte received (fictitious in this case, since the connection is new and nothing yet has been received).