Julian Anastasov wrote:
For IP not *TCP*. I must do this myself I think, but it's fine, I can do
On Tue, 11 Sep 2001, Padraig Brady wrote:
Chris, I'm only filling in the TCP header, and I realise the IP header
filled appropriately when sent. However I need to calculate the checksum for
the TCP header which is actually calculated for the pseudo header:
The checksum is calculated for you in raw_getrawfrag()
So I need to determine the source address before sending...
getsockname() gives it to you after connect() to the
I don't have to worry about source routing, but thanks for the info. I
I have to call connect() so, do I?
You have to, if you need the source address
Great I don't have to do it so.
Basically I'm building a TCP header and need to use a local port number that
I'm still unsure how to get a source port that will never clash with
existing connections, but that's not a major problem.
Hm, then you have to create a normal TCP socket and to
receive port with bind(). I don't know your goals, so you have to
take into account everything you know.
wont clash with anything. I'll just use rand() for the moment, if there