Resolving port number to program name


 
Thread Tools Search this Thread
Operating Systems Solaris Resolving port number to program name
# 1  
Old 03-07-2012
Resolving port number to program name

I was just checking to see if anyone had a script that would allow me to go from port number to program name. I tried to create my own script but it looks like it only works for IPv4 sockets and it looks like daemons such as sshd return as AF_INET6 (in pfiles) for some reason. I can fix my script but the solution isn't immediately obvious and was just wondering if anybody has already fixed this problem as it seems popular.

I would use OpenCSW to install a better netstat but they want to minimize third party software on here.

- Joel

---------- Post updated at 08:28 PM ---------- Previous update was at 08:16 PM ----------

found one online, so this question's more dead space for now, I'd like it to be deleted if at all possible.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Discover the program that use serial port (Sherlock Holmes Case)

Hi, I received a server that use AIX 5.x. This server was installed from a company that doesnt exist now, and they dont leave information about it. I only know that they installed a program that recieve information from some tty in a special format and as it is a tty, with some baud rate,... (4 Replies)
Discussion started by: trevian3969
4 Replies

2. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

3. UNIX for Advanced & Expert Users

Port number file

In which file inside the application code we can find the list of port numbers that the application is entitled to listen? (4 Replies)
Discussion started by: p_gautham12
4 Replies

4. Shell Programming and Scripting

Program to listen a port

I need to launch a script as soon as a file comes via a specified port on my system from another system. Program should work as a dameon and should invoke only when port start/stop accepting file. Any idea how to program/script it... Please no suggestions for cron. Thanks in advance. (1 Reply)
Discussion started by: sumitwa
1 Replies

5. Programming

how to check port binding in pcap receiving program?

hi, I am writing one packet receiving program using libpcap library. Now, I want to check port is already using or not. how to check in receiver program.. If normal program, bind return value we can able to check the port using or not. but, in pcap program how can i check? thank... (1 Reply)
Discussion started by: ram.sj
1 Replies

6. UNIX for Dummies Questions & Answers

port number

hi all i want to connect a system, how can i know the port number of a system. (2 Replies)
Discussion started by: tukuna82
2 Replies

7. UNIX for Dummies Questions & Answers

Need to know port number

Hi expert, I wanted to know in which port my apache is running in solaris box thanks Shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies

8. UNIX for Dummies Questions & Answers

unix program that can port scan a c block of ips for proxies

can anyone tell me a unix program that can port scan a c block of ips for proxies? a fast one, with reliable results, that can load an ip list, or set an ip range, and specify ports thanks! (1 Reply)
Discussion started by: user
1 Replies

9. IP Networking

Resolving port 8080 in DNS

Hi I have my DNS servers (BIND 8) running on two Solaris 8 boxes. I need to be able to resolve an address blah.xxx.net to an IP address followed by :8080 - (for Tomcat). I tried doing this in my zone file but it failed. Can someone give me a pointer on where this configuration should be done?... (1 Reply)
Discussion started by: korfnz
1 Replies

10. Cybersecurity

get number of a port

Hello every one. I work in a LAN with many application server. Each one use a different port. What command permit to obtain the number of these port. thanks (2 Replies)
Discussion started by: hoang
2 Replies
Login or Register to Ask a Question
SOCKET-CONTEXT-OPTIONS(3)						 1						 SOCKET-CONTEXT-OPTIONS(3)

Socket context options - Socket context option listing

	Socket context options are available for all wrappers that work over sockets, like tcp, http and ftp.

	      o $bindto
		-  Used to specify the IP address (either IPv4 or IPv6) and/or the port number that PHP will use to access the network. The syntax
		is ip:port for IPv4 addresses, and [ip]:port for IPv6 addresses. Setting the IP or the port to 0 will let the system choose the IP
		and/or port.

	      Note

		      As FTP creates two socket connections during normal operation, the port number cannot be specified using this option.

	      o $backlog
		- Used to limit the number of outstanding connections in the socket's listen queue.

	      Note

		      This is only applicable to stream_socket_server(3).

       +--------+-----------------+
       |Version |		  |
       |	|		  |
       |	|   Description   |
       |	|		  |
       +--------+-----------------+
       | 5.3.3	|		  |
       |	|		  |
       |	|  Added backlog. |
       |	|		  |
       | 5.1.0	|		  |
       |	|		  |
       |	|  Added bindto.  |
       |	|		  |
       +--------+-----------------+
       Example #1

	      Basic $bindto usage example

	      <?php
	      // connect to the internet using the '192.168.0.100' IP
	      $opts = array(
		  'socket' => array(
		      'bindto' => '192.168.0.100:0',
		  ),
	      );

	      // connect to the internet using the '192.168.0.100' IP and port '7000'
	      $opts = array(
		  'socket' => array(
		      'bindto' => '192.168.0.100:7000',
		  ),
	      );

	      // connect to the internet using the '2001:db8::1' IPv6 address
	      // and port '7000'
	      $opts = array(
		  'socket' => array(
		      'bindto' => '[2001:db8::1]:7000',
		  ),
	      );

	      // connect to the internet using port '7000'
	      $opts = array(
		  'socket' => array(
		      'bindto' => '0:7000',
		  ),
	      );

	      // create the context...
	      $context = stream_context_create($opts);

	      // ...and use it to fetch the data
	      echo file_get_contents('http://www.example.com', false, $context);

	      ?>

PHP Documentation Group 												 SOCKET-CONTEXT-OPTIONS(3)