[Swan-dev] [Swan-commit] modularity erosion

Andrew Cagney andrew.cagney at gmail.com
Wed Feb 13 00:21:46 UTC 2019


On Tue, 12 Feb 2019 at 11:25, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>
> commit 6909918af77cb8cc39bdad12c51543e16f8297a9
> Author: Paul Wouters <pwouters at redhat.com>
> Date:   Mon Feb 11 19:26:40 2019 -0500
>
>     pluto: removal all but one include of proposals.h
>
>     Since connections.h needs it, and that is included everywhere else,
>     there is no need for separate includes.
>
> If this becomes a trend, this is terrible.

I suspect a lot weren't needed before this change - #includes seem to breed,

> In this particular case, it seems forced:
>
> struct connection has:
>
>         struct ike_proposals ike_proposals;
>         struct child_proposals child_proposals;

The fields are shared between IKEv1 and IKEv2.

The old code had something like:
    struct {ike,esp}_alg_info {
      struct alg_info ai;
    }
(yes esp, was used by ah)

which pretty much forced everything to include the header anyway so
that they could pass &ai.

Anyway, a cleanup I've somewhere in my queue is to move the definition
of struct {ike,child}_proposal to connection.h, they're not used by
the proposal code proper.


More information about the Swan-dev mailing list