Hello,
On Tue, 11 Sep 2001, Padraig Brady wrote:
> Chris, I'm only filling in the TCP header, and I realise the IP header
> will be
> 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
DGRAM socket.
> I don't have to worry about source routing, but thanks for the info. I
> don't think
> I have to call connect() so, do I?
You have to, if you need the source address
> 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.
> Thanks,
> Padraig.
Regards
--
Julian Anastasov <ja@xxxxxx>
|