CFanatic

Go Back   CFanatic > Advance Programming > Network Programming


  #1  
Old 09-28-2007, 08:09 AM
Junior Member
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
geetha is on a distinguished road
| More
Smile I need help in Programming in C

Hello,
I got a networking problem that should be worked out in C.
we use 01111110 as a flag to delimit the start and end of frames. Bit stuffing allows arbitrary data patterns to be used in a frame and still allow a receiver to determine the beginning and end of a frame. After every 5 consecutive 1's in the data, an extra 0 is added; the process is reversed at the receiver. If there are two consecutive frames, then assume that there is a separate flag for the end of the first and a separate flag for the start of the second. Any frames that do not start or end with a valid flag are discarded.
Sender: Reads ASCII 0's and 1's entered from the keyboard and frames them with the 01111110 sequence appropriately and after every 5 consecutive 1's in the data, an extra 0 is added.
Receiver: Takes an ASCII bit stream and breaks it up into frames. Assume that the input is a long character string, which you will read from a file, containing ASCII 0's and 1's. Your output should be a sequence of frames (1 per line) with all flags and stuffed bits removed. If an error is detected, print "Error Detected" and discard the rest of the frame. An error is detected when we see 7 consecutive 1s. Please help me with the C code for this problem.
Thanks,
Geetha
Reply With Quote
  #2  
Old 07-25-2008, 05:13 AM
Senior Member
 
Join Date: Jul 2008
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
xpi0t0s is on a distinguished road
| More
Re: I need help in Programming in C

Sure. How far have you got and where are you stuck?
Reply With Quote
  #3  
Old 10-17-2008, 10:44 PM
Junior Member
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
fvcdaniel is on a distinguished road
| More
Re: I need help in Programming in C

interesting that...
what opperation system are you running?
and what part of code do you have?
can you post them?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ socket programming DynamitMsk C++ Programming 1 02-13-2008 10:40 AM
programming languages carmitp Introduce yourself 1 07-27-2007 08:47 AM
Windows Programming using C++ HK Win32 Programming 1 06-05-2007 09:38 PM

 

Follow CFanatic on Twitter
CFanatic Search
Custom Search

Advertisement

Go4Expert's Job Board
Powered by

Go4Expert Newsletter
Enter your Name and Email Address below and Click Subscribe.

Subscriber Counter

Not planning to subscribe yet, browse Go4Expert's Newsletter Archive

All times are GMT -5. The time now is 05:29 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Looking for work in C, C++, C#? Sign up at Elance and search over 30,000 Freelancing jobs today.