Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 317073 Details for
Bug 458022
kernel: random32: seeding improvement [rhel-4.8]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
test case (generates script for octave + gnuplot)
udp.c (text/x-csrc), 901 bytes, created by
Vitaly Mayatskikh
on 2008-09-18 13:05:14 UTC
(
hide
)
Description:
test case (generates script for octave + gnuplot)
Filename:
MIME Type:
Creator:
Vitaly Mayatskikh
Created:
2008-09-18 13:05:14 UTC
Size:
901 bytes
patch
obsolete
>#include <stdio.h> >#include <errno.h> >#include <string.h> >#include <sys/types.h> >#include <sys/socket.h> >#include <netinet/in.h> > >#define PORTS 65536 > >int main() >{ > int s, err, i, j; > char buf[256]; > struct sockaddr_in sa; > int optval = 1, port; > unsigned int p[PORTS]; > > memset(p, 0, sizeof(int)*PORTS); > > for (i = 0; i < PORTS * 100; ++i) { > s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); > memset(&sa, 0, sizeof(sa)); > sa.sin_addr.s_addr = htonl(INADDR_ANY); > sa.sin_family = AF_INET; > sa.sin_port = 0; > setsockopt(s, IPPROTO_UDP, SO_REUSEADDR, &optval, sizeof(optval)); > err = bind(s, (const struct sockaddr*)&sa, sizeof(sa)); > getsockname(s, (struct sockaddr*)&sa, &j); > port = ntohs(sa.sin_port); > p[port]++; > close(s); > } > printf("x = 32767:1:65535;\ny = ["); > for (i = 32767; i < PORTS; i++) > printf("%d%s", p[i], (i + 1 < PORTS ? "; " : "")); > printf("];\nplot(x,y,'.');pause;"); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 458022
:
317070
|
317071
|
317072
| 317073 |
317074
|
317075