Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/19/03 13:05
Read: times


 
#39416 - thanks, the next step
Responding to: ???'s previous message
is to add some server code to it, i.e. make it also able to receive a packet, and perform some kind of task based on it. The code has some comments in it, but God knows there's no coding standard in place. For the most part, the IP header and the UDP headers have hard-coded fields. There are two "one's complement of one's complement sums" to be calculated, but that's really the only hard part about building the packet.

I think I might try to implement a port 7 echo server, or a port 19 character generator. What the code does right now is send the same UDP packet over and over. The IP identification field is left at 0x0000, and I think with UDP the checksum is optional. But it is not optional with IP, so I figured if I have to add the code to do the IP checksum, I might as well do the UDP checksum as well.

Bascially, UDP need not be hard at all, and can be added to an 8051 assembly language program not necessarily as a whole stack, but as a couple of subroutines, that take a user data message, and fills it out with header information.

SLIP is really nothing more than putting a 0xc0 at the beginning and end of every datagram, and escaping any 0xc0 in the datagram itself. I was almost disappointed when I realized that that was all it was. It just delimits packets, showing where they start and stop on the serial line.

One last note for LINUX users, SLIP is hardly ever included anymore in kernel configuration. I compiled SLIP as a module and insmod'ed it. I upload IHX files to my 80c552 over serial port anyway, so what I do is once the program is uploaded it immediately starts running, and I then allow slattach and ifconfig to take over the same serial port for packet transfer.

I just wanted a cheaper and simpler solution than an embedded ethernet board, which would be overkill for what I want to do with it.

Check back to my website often, I will be concentrating on UDP for a while and will update the documentation as I go.

http://www.tigerprecision.com/80c552/

List of 5 messages in thread
TopicAuthorDate
UDP/IP over SLIP!!!            01/01/70 00:00      
   RE: UDP/IP over SLIP!!!            01/01/70 00:00      
      thanks, the next step            01/01/70 00:00      
   RE: UDP/IP over SLIP!!!            01/01/70 00:00      
      Also, have ICMP over SLIP now!!!            01/01/70 00:00      

Back to Subject List