Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Go-back N Protocol


  • Please log in to reply
3 replies to this topic

#1 petocities

petocities

  • Members
  • 102 posts
  • OFFLINE
  •  
  • Location:Santiago Chile
  • Local time:08:14 PM

Posted 26 May 2007 - 09:02 PM

Hey guys. I have to make a Go-Back N protocol (Automatic Repeat-reQuest protocol), which is a specific kind of protocol for networks, used to send frames in a secure way using unstable networks. The thing is I have to implement the Dwrite and Dread functions, which basically take the archive and makes a package with it, then invokes Fwrite (or Fread) to send-recieve it.
The idea is pretty simple, but i got really confused with the programming. So i wanted to ask if there is anyone who could give a few tips on where to start from.
My teacher gave me the Fread and Fwrite functions anlready (sort of, anyway), so i should just implement Dwrite and Dread. But everytime I start, I get stuck at the beggining. Some of my problems are that I do not know how to calculate the checksum of a frame (number of bites with value '1'), or I do not know what is that int that Fread returns, hehe :flowers:

well, any tips or hints would be greatly appreciated. If you do not know what i'm talking about, check wikipedia. They also have some nice java applets for demonstrating how it works :thumbsup:
Posted Image

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:14 PM

Posted 27 May 2007 - 09:57 AM

Are you programming in Java or C#?

When it comes to coding (and specifically homework assignments) we do not provide any starting code. But as soon as you provide some of your own code, we are happy to help steer you in the proper direction. :thumbsup:

#3 petocities

petocities
  • Topic Starter

  • Members
  • 102 posts
  • OFFLINE
  •  
  • Location:Santiago Chile
  • Local time:08:14 PM

Posted 29 May 2007 - 10:05 PM

Are you programming in Java or C#?

When it comes to coding (and specifically homework assignments) we do not provide any starting code. But as soon as you provide some of your own code, we are happy to help steer you in the proper direction. :thumbsup:


haha yea, i guess is not very helpful to solve my homework for me.
I'm doing it in C#. My problem is that they gave us this base code which is really complicated, so even if i know what i have to do (Dwrite, Dread and the frame-error checking) i don't know where to start. So I wanted some hints or tips on how to start, like "you should try to figure a way for x first".
Well, tomorrow i'll give it real thought, cuz i had a test today, and then I'll see what comes up.
Posted Image

#4 petocities

petocities
  • Topic Starter

  • Members
  • 102 posts
  • OFFLINE
  •  
  • Location:Santiago Chile
  • Local time:08:14 PM

Posted 01 June 2007 - 08:42 PM

Ok. First of all, the base i was given to work with, had some mistakes, so my program was not working anyway.
But the first big problem I am facing, is more like a programming problem. I have a function which is called Get_next_event(int timeout), which is supposed to be invoked at some point, and wait to see the result. The problem is that I don't know how to make a propper timer.

Some hints that may help: I'm using C# (said it before, but repeat anyway), and I am working with threads. I read somewhere that threads have a wait() or stand() method, but I am not sure if it is the propper way to solve this case. The chain works this way:
- Thread1 invokes Method1, which sends its result to another thread, and has to wait for a response. Method1 invokes Get_next_event(timeout).
- Thread2 does his job, and then tries to get and send a response for Method1.
- If the response doesn't come in (timeout) seconds (say 1000 milliseconds), Method1 in Thread1 executes again. If it recieves the response, the method calls get_next_event(timeout) to set that he got the result.

If anyone knows how to implement a nice, good looking timer, it would be great! Thanks guys, and be safe

Edited by petocities, 01 June 2007 - 08:44 PM.

Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users