Opened 11 months ago

Last modified 5 days ago

#29210 merge_ready 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


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

#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
#30984merge_readycatalystMake a key-value line abstraction to output control repliesCore Tor/Tor

Change History (8)

comment:1 Changed 8 months ago by nickm

Milestone: Tor: 0.4.1.x-final

comment:2 Changed 7 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 6 months ago by gaba

Owner: set to catalyst
Status: newassigned

comment:4 Changed 6 months ago by catalyst

Status: assignednew

comment:5 Changed 6 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 5 months ago by gaba

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

comment:7 Changed 3 months 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.

comment:8 Changed 5 days ago by catalyst

Status: newmerge_ready

Remaining child ticket is merge_ready.

Note: See TracTickets for help on using tickets.