pt_dump(network_dump_upcall, &pid);
pt_dump(network_dump_upcall, &pid, AF_UNSPEC);
rde_dispatch_imsg_session(struct imsgbuf *ibuf){	struct imsg		 imsg;	struct session_up	 sup;	struct rrefresh		 r;	pid_t			 pid;	int			 n;	if ((n = imsg_read(ibuf)) == -1)		fatal("rde_dispatch_imsg_session: imsg_read error");	if (n == 0)	/* connection closed */		fatal("rde_dispatch_imsg_session: pipe closed");	for (;;) {		if ((n = imsg_get(ibuf, &imsg)) == -1)			fatal("rde_dispatch_imsg_session: imsg_read error");		if (n == 0)			break;		switch (imsg.hdr.type) {		case IMSG_UPDATE:			rde_update_dispatch(&imsg);			break;		case IMSG_SESSION_UP:			if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(sup))				fatalx("incorrect size of session request");			memcpy(&sup, imsg.data, sizeof(sup));			peer_up(imsg.hdr.peerid, &sup);			break;		case IMSG_SESSION_DOWN:			peer_down(imsg.hdr.peerid);			break;		case IMSG_REFRESH:			if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(r)) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			memcpy(&r, imsg.data, sizeof(r));			peer_dump(imsg.hdr.peerid, r.afi, r.safi);			break;		case IMSG_NETWORK_ADD:			if (imsg.hdr.len - IMSG_HEADER_SIZE !=			    sizeof(struct network_config)) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			network_add(imsg.data, 0);			break;		case IMSG_NETWORK_REMOVE:			if (imsg.hdr.len - IMSG_HEADER_SIZE !=			    sizeof(struct network_config)) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			network_delete(imsg.data, 0);			break;		case IMSG_NETWORK_FLUSH:			if (imsg.hdr.len != IMSG_HEADER_SIZE) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			network_flush(0);			break;		case IMSG_CTL_SHOW_NETWORK:			if (imsg.hdr.len != IMSG_HEADER_SIZE) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			pid = imsg.hdr.pid;			pt_dump(network_dump_upcall, &pid);			imsg_compose_pid(&ibuf_se, IMSG_CTL_END, pid, NULL, 0);			break;		case IMSG_CTL_SHOW_RIB:			if (imsg.hdr.len != IMSG_HEADER_SIZE) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			pid = imsg.hdr.pid;			pt_dump(rde_dump_upcall, &pid);			imsg_compose_pid(&ibuf_se, IMSG_CTL_END, pid, NULL, 0);			break;		case IMSG_CTL_SHOW_RIB_AS:			if (imsg.hdr.len - IMSG_HEADER_SIZE !=			    sizeof(struct as_filter)) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			pid = imsg.hdr.pid;			rde_dump_as(imsg.data, pid);			imsg_compose_pid(&ibuf_se, IMSG_CTL_END, pid, NULL, 0);			break;		case IMSG_CTL_SHOW_RIB_PREFIX:			if (imsg.hdr.len - IMSG_HEADER_SIZE !=			    sizeof(struct ctl_show_rib_prefix)) {				log_warnx("rde_dispatch: wrong imsg len");				break;			}			pid = imsg.hdr.pid;			rde_dump_prefix(imsg.data, pid);			imsg_compose_pid(&ibuf_se, IMSG_CTL_END, pid, NULL, 0);			break;		default:			break;		}		imsg_free(&imsg);	}}