Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-20-2012, 04:12 AM   #1
LQ Newbie
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
packet distribution interval:


Can anyone give solution for the bellow problem:

I have requirement to calculate transmit interval based on packet size , resolution , rate and some other parameters.

for example:

here all members are integers.

transInt = (U_INT16)((packetSize * 8000000ULL) / (rate[intCnt] * resolution)).

for example the R.H.S result is 11.7 nano sec, the resultant transInt becomes 11.that means for every 11ns packet is generating instead of 11.7ns.because of this throughput is increasing morethan expected.

Note: rate[intCnt] not same for everytime.

float variables not advisable.

Please provide a simple c code to solve this problem.

Here is the attachment which will have sample code using corrently,

suneel kumar.
Attached Thumbnails
Click image for larger version

Name:	sample_code.GIF
Views:	11
Size:	8.0 KB
ID:	9510  

Last edited by suneelnalluri; 04-23-2012 at 12:18 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] example for netwrok packet code for creating a module and access the packet data oracle89divi22 Linux - Newbie 13 01-13-2012 04:27 PM
packet distribution sniffer_raghav Linux - Networking 3 07-05-2008 11:15 PM
A packet filter using libipq which uses ether type field to capture the packet can26_manish Programming 2 10-16-2007 05:35 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration