void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m)
{
    struct tftphdr *hdr = mtod_check(m, sizeof(struct tftphdr));

    if (hdr == NULL) {
        return;
    }

    switch (ntohs(hdr->tp_op)) {
    case TFTP_RRQ:
        tftp_handle_rrq(m->slirp, srcsas,
                        mtod(m, struct tftp_t *),
                        m->m_len);
        break;

    case TFTP_ACK:
        tftp_handle_ack(m->slirp, srcsas, hdr);
        break;

    case TFTP_ERROR:
        tftp_handle_error(m->slirp, srcsas, hdr);
        break;
    }
}
void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m)
{
    struct tftphdr *hdr = mtod_check(m, sizeof(struct tftphdr));

    if (hdr == NULL) {
        return;
    }

    switch (ntohs(hdr->tp_op)) {
    case TFTP_RRQ:
        tftp_handle_rrq(m->slirp, srcsas,
                        mtod(m, struct tftp_t *),
                        m->m_len);
        break;

    case TFTP_ACK:
        tftp_handle_ack(m->slirp, srcsas, hdr);
        break;

    case TFTP_ERROR:
        tftp_handle_error(m->slirp, srcsas, hdr);
        break;
    }
}