Opened 8 months ago

Last modified 3 days ago

#29210 new task

Distribute control.c functionality across various modules

Reported by: nickm Owned by: catalyst
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: network-team-roadmap-september, 042-deferred-20190918
Cc: catalyst, teor Actual Points:
Parent ID: Points: 23
Reviewer: Sponsor: Sponsor31-can

Description

The control.c module accesses, and is accessed by, many other modules: it represents a failure of modularity and layering.

Instead, we should give control.c only the responsibility of marshalling and unmarshalling messages for the controller, and give individual modules the responsibility for publishing events and handling commands.

Child Tickets

TicketStatusOwnerSummaryComponent
#29894closednickmInitial split-up on control.cCore Tor/Tor
#30007closedcatalystrefactor control.c output to be more abstractCore Tor/Tor
#30091closednickmUnify parsing code for control.cCore Tor/Tor
#30889closedcatalystEliminate some uses of lower-level control protocol output functionsCore Tor/Tor
#30984acceptedcatalystMake a key-value line abstraction to output control repliesCore Tor/Tor

Change History (7)

comment:1 Changed 5 months ago by nickm

Milestone: Tor: 0.4.1.x-final

comment:2 Changed 4 months ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.4.2.x-final

Move various s31 refactoring tasks to 0.4.2

comment:3 Changed 3 months ago by gaba

Owner: set to catalyst
Status: newassigned

comment:4 Changed 3 months ago by catalyst

Status: assignednew

comment:5 Changed 3 months ago by catalyst

After #30889, there are no remaining uses of connection_write_str_to_buf() or connection_printf_to_buf() outside of control_proto.c apart from a specialized protocol error message that is output by connection_control_process_inbuf(). That error message doesn't conform to the nnn Text format in control-spec.txt.

#30984 will add a key-value abstraction for control replies that should take care of most of the remaining controller-related uses of connection_buf_add() Maybe the async reply stuff will need a separate ticket.

comment:6 Changed 2 months ago by gaba

Cc: catalyst teor added
Keywords: network-team-roadmap-september added
Points: 1023

comment:7 Changed 3 days ago by nickm

Keywords: 042-deferred-20190918 added
Milestone: Tor: 0.4.2.x-finalTor: 0.4.3.x-final

Defer numerous 0.4.2 tickets to 0.4.3.

Note: See TracTickets for help on using tickets.