Example #1
0
void tftp_input(struct mbuf *m)
{
  struct tftp_t *tp = (struct tftp_t *)m->m_data;

  switch(ntohs(tp->tp_op)) {
  case TFTP_RRQ:
    tftp_handle_rrq(m->slirp, tp, m->m_len);
    break;

  case TFTP_ACK:
    tftp_handle_ack(m->slirp, tp, m->m_len);
    break;
  }
}
Example #2
0
void tftp_input(PNATState pData, struct mbuf *m)
{
    struct tftp_t *tp = (struct tftp_t *)m->m_data;

    switch(RT_N2H_U16(tp->tp_op))
    {
        case TFTP_RRQ:
            tftp_handle_rrq(pData, tp, m->m_len);
            break;

        case TFTP_ACK:
            tftp_handle_ack(pData, tp, m->m_len);
            break;
    }
}
Example #3
0
void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m)
{
  struct tftp_t *tp = (struct tftp_t *)m->m_data;

  switch(ntohs(tp->tp_op)) {
  case TFTP_RRQ:
    tftp_handle_rrq(m->slirp, srcsas, tp, m->m_len);
    break;

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

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