chiark / gitweb /
comm, site: pass a new "struct comm_addr" rather than sockaddr_in
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jun 2011 11:01:08 +0000 (12:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Aug 2011 22:03:55 +0000 (23:03 +0100)
commita15faeb2b12e9cc0e3d1352cf4c233fc61c51c1c
treec57099096d8b28de054e718850a2b4c39d1b1296
parent16045f8d416f9d9c946f64587a45ae71303410a5
comm, site: pass a new "struct comm_addr" rather than sockaddr_in

This abstracts away the fact that the peer address is a sockaddr_in;
instead, most of the code in site.c now only handles the peer address
as an opaque structure.

We put the  struct comm_if*  in the address structure too, as this will
be useful later.  Amongst other things, doing this arranges that the
comm client knows which comm is notifying about an incoming packet.
Previously the client was expected to "just know" because the only
actual client in secnet is site which currently only deals with one
comm.

Also make the relevant arguments const-correct.

Contains consequential changes the signatures of many functions but no
intentional functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
secnet.h
site.c
udp.c