examples/udpblaster: Fix some nxstyle errors
This commit is contained in:
parent
60378318d3
commit
e8b0c903bc
@ -49,6 +49,10 @@
|
|||||||
|
|
||||||
#include "udpblaster.h"
|
#include "udpblaster.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* main
|
* main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -115,10 +119,13 @@ int main(int argc, char **argv, char **envp)
|
|||||||
* bits/sec = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE
|
* bits/sec = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE
|
||||||
* bytes/sec = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE / 8
|
* bytes/sec = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE / 8
|
||||||
* packets/sec = (bytes/sec) / (bytes/packet)
|
* packets/sec = (bytes/sec) / (bytes/packet)
|
||||||
* = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE / UDPBLASTER_SENDSIZE / 8
|
* = CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE /
|
||||||
|
* UDPBLASTER_SENDSIZE / 8
|
||||||
* delay = microseconds/packet
|
* delay = microseconds/packet
|
||||||
* = (1000000 * UDPBLASTER_SENDSIZE) / CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE / 8
|
* = (1000000 * UDPBLASTER_SENDSIZE) /
|
||||||
* = (125000 * UDPBLASTER_SENDSIZE) / CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE
|
* CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE / 8
|
||||||
|
* = (125000 * UDPBLASTER_SENDSIZE) /
|
||||||
|
* CONFIG_EXAMPLES_UDPBLASTER_HOSTRATE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sendsize = UDPBLASTER_SENDSIZE;
|
sendsize = UDPBLASTER_SENDSIZE;
|
||||||
@ -127,7 +134,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
npackets = 0;
|
npackets = 0;
|
||||||
ndots = 0;
|
ndots = 0;
|
||||||
|
|
||||||
for (;;)
|
for (; ; )
|
||||||
{
|
{
|
||||||
ret = sendto(sockfd, g_udpblaster_text, sendsize, 0,
|
ret = sendto(sockfd, g_udpblaster_text, sendsize, 0,
|
||||||
(struct sockaddr *)&target, addrlen);
|
(struct sockaddr *)&target, addrlen);
|
||||||
@ -143,10 +150,10 @@ int main(int argc, char **argv, char **envp)
|
|||||||
npackets = 0;
|
npackets = 0;
|
||||||
|
|
||||||
if (++ndots >= 50)
|
if (++ndots >= 50)
|
||||||
{
|
{
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
ndots = 0;
|
ndots = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(delay);
|
usleep(delay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user