[ee122] MNL vs. UDP sendto()

Kristian Lyngbaek kristianlyngbaek at berkeley.edu
Tue Dec 11 01:14:55 PST 2007

We had a fully functional ready to submit program using UDP sendto() (well
before submission deadline i might add).

We are under the impression that MNL sendto() is supposed to be a
transparent function such that we can replace all of our UDP sendto()s with
MNL sendto()s.

This is not the case.

In an attempt to prepare for the HTTP client/server early on, our
implementation involves a listening port on the receiver that sets up pairs
of sockets on either side.  (one for outgoing, one for incoming data - these
were meant to be used for data transfer in HTTP transactions)

We connected the sockets on either end, and our UDP sendto() calls look like

   sendto(node->out_fd, &s_header, S_HSIZE, 0, NULL, sizeof blankAddr);

Our MNL sendto() calls look like this:

  MNL_sendto(node->out_fd, &s_header, S_HSIZE, 0, serv_addr, length,
node->seqNumber, 0, S_HSIZE, &error);

(serv_addr is allready struct sockaddr pointer, error is a local variable,
etc. (basically our arguments are valid))

When we replaced our UDP sends with MNL sends, the MNL daemons said that the
packets were getting sent to the appropriate sockets, but in reality the
packets were not making it.
It seemed that MNL sentto() only worked between the initial sender socket
and receiver listening port. As soon as the receiver handed over the job to
the other specially created sockets/ports MNL sentto() stopped working,
although UDP sendto() does.

We were wondering if MNL sendto() can only support 1 connection - Or
transfer between only 2 sockets.  As in if you send from one socket to
another.  And then from the same socket to a DIFFERENT one, will MNL fail?
because in our case it sure seems like it does.

Any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/ee122/attachments/20071211/7556eb52/attachment.html 

More information about the ee122 mailing list