The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
Networking Programming
Discuss Networking Programming in the C Programming forum on Dev Shed. Networking Programming C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 3rd, 2013, 04:27 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
|
Networking Programming
Can we send and receive data on different data rates using a single machine?
If yes, then How?
Kindly discuss.
|

January 3rd, 2013, 04:54 AM
|
 |
I'm Baaaaaaack!
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
Sounds like homework to me.
|

January 4th, 2013, 09:08 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
|
Dear Mitakeet
Welcome back.
Did you understand what I mean?
Second
How to print characters on the screen at two per second
Feel free to ask
|

January 4th, 2013, 09:24 PM
|
 |
I'm Baaaaaaack!
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
What do you mean by 'different data rates'? You can have different speed NICs on a single machine, you can have several of the same speed NIC but transmit at different rates and you can send to different destinations at different rates using the same NIC.
|

January 4th, 2013, 09:34 PM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
|
I didn't understand. The title suggests that you are talking about network communication; eg, via TCP/IP over Ethernet. Your talk of data rates is suggestive of baud rates, which would mean that you're talking about serial port communication.
Could you please explain the question more fully? Supply supporting information. We should not answer your homework question for you, but if you supply us with the work you've done so far by explaining the reasoning behind your questions, then we should be more inclined to help -- it's the smell of the all-too-common situation of "do my work for me" that we may overreact to. And if this is for work or a personal project, then a fairly detailed description of what you're trying to do would help, though of course do not divulge information that would identify your company or jeopardize proprietary information.
|

January 4th, 2013, 10:52 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
|
my name is Jawad Durrani.
I am doing my final project in MS.
The topic is "Simulate adaptive jitter buffer and study the behavior of AMR-WB in VoIP.
I have following questions.
Q1 Can we send and receive data on the same machine which is not connected to any network.
Q2 How we will send and receive data on the same machine which is not connected to any network with different data rates.
Q3 How we will create artificial network traffic.
Q4 How we will create an array in which we store the sound clips.
Q5 How we will create, send and receive a voice packet of 20ms.
We will discuss them one by one.
The questions what I am asking are the sub questions of these.
I am using MatLab for my simulation. But no problem if you guide me in any language e.g. C/C++/VB.net.
A part from these questions.
How to print characters on the screen at two per second?
I hope it would be sufficient for clarification.
and I hope you people will help to pull me out.
Still if you people are confused then feel free to ask.
|

January 4th, 2013, 11:02 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
Quote: | Originally Posted by durani01 Q1 Can we send and receive data on the same machine which is not connected to any network.
|
Yes, it is called the loopback interface.
Quote: | Originally Posted by durani01 How we will send and receive data on the same machine which is not connected to any network with different data rates. |
You could add delays in your send and receive loops.
Quote: | Originally Posted by durani01 Q3 How we will create artificial network traffic. |
Depends on what kinda network you're talking about. I personally use a small program I wrote in C and also JMeter, depending on the application that I'm testing for loads.
Quote: | Originally Posted by durani01 Q4 How we will create an array in which we store the sound clips. |
Depends on what language you are using. How good are you at programming and are you familiar with any programming languages at all?
Quote: | Originally Posted by durani01 Q5 How we will create, send and receive a voice packet of 20ms. |
Again, what language can you program in? Also, what is your programming environment?
Quote: | Originally Posted by durani01 A part from these questions.
How to print characters on the screen at two per second? |
Use delay statements in your code. Again, depends on language and environment you're using
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|

January 5th, 2013, 12:40 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
|
Dear Scorpion
Thank you very much for your reply.
Kindly explain each answer in detail. if possible explain with example.
I am using MatLab for my simulations.
but it would be no problem if you explain in any language e.g. C/C++/VB.net
If you don't have much time then we will discuss it one by one but with detail.
|

January 5th, 2013, 02:41 AM
|
 |
Contributed User
|
|
|
|
> The topic is " Simulate adaptive jitter buffer and study the behavior of AMR-WB in VoIP.
Since the goal is a simulation, why do you need 'real' networking?
Isn't this just a case of
T1 received 123 bytes
T2 received 1230 bytes
T3 received 456 bytes
T4 received 652 bytes
and so on.
Using wireshark and an existing VoIP application (use google to find one for your machine), you'll get a general idea of packet sizes and intervals.
So if you figure out that packet intervals are between 20mS and 100ms (these are Tmin and Tmax), and that packet sizes vary between 100 bytes and 10kbytes (these are Smin and Smax).
But after that, all you need for your simulation is a means of generating intervals between Tmin and Tmax, and packet sizes between Smin and Smax, all of which you will have figured out from a bit of study on a real-world application.
Make sure you choose the right random function, so you have a normal distribution. At other random intervals, you will change the above Xmin and Xmax values to simulate changes in network conditions (bandwidth and latency).
It's a simulation - you fake everything within whatever parameters you think are reasonable.
|

January 5th, 2013, 03:36 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
Dear Mr. Saleem
First of all thank you very much for your reply.
Second I don't need real network.
Yes you are right. Its simulation. I have to produce everything fake.
I am going to use Windows Platform and MatLab for my simulations.
I have no expertise on Linux or Wireshark.
I have little knowledge about Linux and wireshark.
Also I don't want to waste the time in making my expertise in other tools.
Quote: Isn't this just a case of
T1 received 123 bytes
T2 received 1230 bytes
T3 received 456 bytes
T4 received 652 bytes
and so on. |
I can't understand what does it means.
Quote: Using wireshark and an existing VoIP application (use google to find one for your machine), you'll get a general idea of packet sizes and intervals.
So if you figure out that packet intervals are between 20mS and 100ms (these are Tmin and Tmax), and that packet sizes vary between 100 bytes and 10kbytes (these are Smin and Smax). |
Kindly explain it as well.
|

January 5th, 2013, 09:52 AM
|
 |
I'm Baaaaaaack!
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
I think you are way out of your depth. C or C++ can certainly do what you need done (I have done exactly this a number of times to test intrusion detection systems), but there is a rather steep learning curve for most people in getting up-to-speed with C/C++ and another one for socket programming. You are going to be _way_ better off using some scripting language (like Perl, Python, etc.) to do the sorts of things you need. Besides, as Salem says, when it is all boiled down, you don't need C, C++ or sockets to accomplish your goal.
|

January 6th, 2013, 10:23 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 1 h 15 m 8 sec
Reputation Power: 0
|
|
|
How we will process a data with different data rates.
e.g. 16kbps, 32kbps.
How we will create, send and receive a voice packet of 20ms and size of 100 bytes.
|

January 7th, 2013, 03:54 AM
|
 |
I'm Baaaaaaack!
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
You really should get a programmer to join your team. What you are asking to do is rather trivial which is just more indication that you are in over your head.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|