Sponsored Content
Special Forums IP Networking Get process id and port from the socket Post 302899640 by Vishal_dba on Wednesday 30th of April 2014 12:12:01 PM
Old 04-30-2014
Hi,


This is AIX.


Best regards,
Vishal
 

10 More Discussions You Might Find Interesting

1. Programming

socket on serial port

Does anyone know if it's possible to send socket by a serial port ? If yes, how can I find on Irix the value of my serial ports to use with this function : serverSockAddr.sin_port = ? Thanks for all responses ! Kintoo (2 Replies)
Discussion started by: kintoo
2 Replies

2. Programming

[Problem]Reuse port in BSD socket

I write a chat server using BSD socket, which is listen to an specific port, say 1212. After the chat server is shutdown, I want to execute the program again. But kernel will say that the port 1212 is now unavailable. I have to wait for a while to reuse the port 1212. I am sure there's no... (1 Reply)
Discussion started by: Namely
1 Replies

3. UNIX for Dummies Questions & Answers

Socket programming:One server two port

I want my server socket to listen on two ports in my machine. How do i achieve it? I will have two clients one connecting to 1 port and another to a different port. So my server needs to listen to both. Thanks. (1 Reply)
Discussion started by: abc.working
1 Replies

4. Programming

Cloning a socket connection, using other port numbers

Hello everybody, I've coded a multi-client server based on internet sockets using the scheme listen on port X-accept-fork, exactly like beej's guide At some point I would like to establish a secondary connection between a client and the server-child serving him. I was considering the... (4 Replies)
Discussion started by: jonas.gabriel
4 Replies

5. UNIX for Dummies Questions & Answers

permission to bind a socket to port 843?

I have written a flash socket security file server in PHP. The basic idea is that when Flash Player connects via socket to a server, the first thing it does is connect to port 843 and send a request for a 'socket policy file' by sending the string <policy-file-request/>. The problem I have is... (5 Replies)
Discussion started by: sneakyimp
5 Replies

6. IP Networking

Port number of socket returned by accept()

Hi, I typed a few tcp/ip client/server examples from a book and it works - sort of - but I noticed something strange. When I run my server I set it to use port 3001 and the client uses the same port to connect to server. They succeed, but the server prints something that doesn't really make much... (0 Replies)
Discussion started by: idelovski
0 Replies

7. Programming

Using socket to test a TCP port

Hello, I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies

8. Solaris

How to clear network socket port 17005?

:)Hi Solaris Experts, I am wondering whether it is possible to clear a network socket port 17005 left by Apache Tomcat/6.0.20 after having to terminate it forcefully, since it has run away due to remote JDBC resource contention on another server. A normal Tomcat stop / shutdown proves... (2 Replies)
Discussion started by: gjackson123
2 Replies

9. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

10. AIX

Process on a specified Terminal and Socket Port does not start

Hi, I new to AIX, and I have been using Rocket UniData in it. I had to set up a Process for Data Exchange by assigning a unique Terminal and a Socket Port to that process. I ran the process for the first time and it was successful and after use I stopped the process. Now when I want to run it... (3 Replies)
Discussion started by: BejoyS
3 Replies
rresvport_af(3) 					     Library Functions Manual						   rresvport_af(3)

NAME
rresvport_af - Retrieves a socket with a privileged address LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <unistd.h> int rresvport_af ( int *port, int family ); PARAMETERS
Specifies the port to use for the connection. Specifies the address family for the socket to be created. Valid values are AF_INET (IPv4) and AF_INET6 (IPv6). DESCRIPTION
The rresvport_af() function obtains a socket with a privileged address bound to the socket. A privileged Internet port is one that falls in the range of 0 to 1023. Only processes with an effective user ID of root can use the rresvport_af() function. An authentication scheme based on remote port num- bers is used to verify permissions. If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM for the specified address family is returned to the calling process. RETURN VALUES
Upon successful completion, the rresvport_af() function returns a valid, bound socket descriptor. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the rresvport_af() function fails, errno may be set to one of the following values: All network ports are in use. The addresses in the specified address family cannot be used with this socket. Two hundred (200) file descriptors are currently open. The system file table is full. Insufficient buffers are available in the system to complete the function. FILES
Contains the service names. RELATED INFORMATION
Functions: rcmd(3), ruserok(3) delim off rresvport_af(3)
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy