Networking Forums

Networking Forums > Computer Networking > Linux Networking > UDP port in use

Reply
Thread Tools Display Modes

UDP port in use

 
 
nanoip@hotmail.com
Guest
Posts: n/a

 
      04-08-2008, 12:37 PM
Hi

I am testing my network software and it crashes some times.

My software crashed and did not free UDP port. I think that kernel
structures
still hold the information for that port. /proc/net/udp has line that
includes some info.
I killed my software/process but still the line is in /proc/net/udp.

And when I start my software again it tells me "UDP port in use".

I can clear the situation by rebooting the PC but is there some other
way
to "free the UDP port"? So, that I do not need to reboot PC.

Help appreciated...ip
 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      04-08-2008, 06:46 PM
On 2008-04-08, (E-Mail Removed) <(E-Mail Removed)> wrote:
>
>
> Hi
>
> I am testing my network software and it crashes some times.
>
> My software crashed and did not free UDP port. I think that kernel
> structures
> still hold the information for that port. /proc/net/udp has line that
> includes some info.
> I killed my software/process but still the line is in /proc/net/udp.
>
> And when I start my software again it tells me "UDP port in use".
>
> I can clear the situation by rebooting the PC but is there some other
> way
> to "free the UDP port"? So, that I do not need to reboot PC.
>
> Help appreciated...ip


Are you sure the process is really killed? Try lsof or "netstat -unlp"
 
Reply With Quote
 
Dan N
Guest
Posts: n/a

 
      04-09-2008, 01:16 AM
Set the socket option, something like:

int on = 1;
setsockopt( sockfd, SO_REUSADDR, &on, sizeof(on) );

Dan



On Tue, 08 Apr 2008 05:37:45 -0700, nanoip wrote:

> Hi
>
> I am testing my network software and it crashes some times.
>
> My software crashed and did not free UDP port. I think that kernel
> structures
> still hold the information for that port. /proc/net/udp has line that
> includes some info.
> I killed my software/process but still the line is in /proc/net/udp.
>
> And when I start my software again it tells me "UDP port in use".
>
> I can clear the situation by rebooting the PC but is there some other
> way
> to "free the UDP port"? So, that I do not need to reboot PC.
>
> Help appreciated...ip

 
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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source port of 1079 (asprovatalk) to destination port 1025 (blackjack) - required for Microsoft Windows networking? Spin Windows Networking 1 10-07-2008 08:09 PM
How many NIC for a event photography viewing system, advantages ofQuad Port (4-port) NICs sam Windows Networking 1 03-17-2008 12:51 PM
Socket connection to port fails despite port open / listening ! Jack Linux Networking 2 12-19-2007 03:46 PM
open ports on the router port 1900udp and port 5643 tcp James Broadband Hardware 0 02-20-2005 08:07 AM
What is the difference between a multi-port ASDL modem/router and one with a 4 port hub? Tim Lyons Broadband 4 02-27-2004 06:07 AM



1 2 3 4 5 6 7 8 9 10 11