| 587 | } |
| 588 | |
| 589 | static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds) |
| 590 | { |
| 591 | enum connectd_wire t = fromwire_peektype(msg); |
| 592 | |
| 593 | switch (t) { |
| 594 | /* These are messages we send, not them. */ |
| 595 | case WIRE_CONNECTD_INIT: |
| 596 | case WIRE_CONNECTD_ACTIVATE: |
| 597 | case WIRE_CONNECTD_CONNECT_TO_PEER: |
| 598 | case WIRE_CONNECTD_DOWNGRADE_PEER: |
| 599 | case WIRE_CONNECTD_DISCONNECT_PEER: |
| 600 | case WIRE_CONNECTD_DEV_MEMLEAK: |
| 601 | case WIRE_CONNECTD_DEV_SUPPRESS_GOSSIP: |
| 602 | case WIRE_CONNECTD_DEV_REPORT_FDS: |
| 603 | case WIRE_CONNECTD_PEER_SEND_MSG: |
| 604 | case WIRE_CONNECTD_PEER_CONNECT_SUBD: |
| 605 | case WIRE_CONNECTD_PING: |
| 606 | case WIRE_CONNECTD_SEND_ONIONMSG: |
| 607 | case WIRE_CONNECTD_INJECT_ONIONMSG: |
| 608 | case WIRE_CONNECTD_CUSTOMMSG_OUT: |
| 609 | case WIRE_CONNECTD_START_SHUTDOWN: |
| 610 | case WIRE_CONNECTD_SET_CUSTOMMSGS: |
| 611 | case WIRE_CONNECTD_DEV_EXHAUST_FDS: |
| 612 | case WIRE_CONNECTD_DEV_SET_MAX_SCIDS_ENCODE_SIZE: |
| 613 | case WIRE_CONNECTD_SCID_MAP: |
| 614 | case WIRE_CONNECTD_CUSTOMMSG_IN_COMPLETE: |
| 615 | /* This is a reply, so never gets through to here. */ |
| 616 | case WIRE_CONNECTD_INIT_REPLY: |
| 617 | case WIRE_CONNECTD_ACTIVATE_REPLY: |
| 618 | case WIRE_CONNECTD_PEER_CONNECT_SUBD_REPLY: |
| 619 | case WIRE_CONNECTD_DEV_MEMLEAK_REPLY: |
| 620 | case WIRE_CONNECTD_START_SHUTDOWN_REPLY: |
| 621 | case WIRE_CONNECTD_INJECT_ONIONMSG_REPLY: |
| 622 | break; |
| 623 | |
| 624 | case WIRE_CONNECTD_PEER_CONNECTED: |
| 625 | case WIRE_CONNECTD_PEER_RECONNECTED: |
| 626 | handle_peer_connected(connectd->ld, msg); |
| 627 | break; |
| 628 | |
| 629 | case WIRE_CONNECTD_PEER_SPOKE: |
| 630 | handle_peer_spoke(connectd->ld, msg); |
| 631 | break; |
| 632 | |
| 633 | case WIRE_CONNECTD_PEER_DISCONNECTED: |
| 634 | handle_peer_disconnected(connectd->ld, msg); |
| 635 | break; |
| 636 | |
| 637 | case WIRE_CONNECTD_CONNECT_FAILED: |
| 638 | handle_connect_failed(connectd->ld, msg); |
| 639 | break; |
| 640 | |
| 641 | case WIRE_CONNECTD_GOT_ONIONMSG_TO_US: |
| 642 | handle_onionmsg_to_us(connectd->ld, msg); |
| 643 | break; |
| 644 | |
| 645 | case WIRE_CONNECTD_CUSTOMMSG_IN: |
| 646 | handle_custommsg_in(connectd->ld, msg); |
nothing calls this directly
no test coverage detected