how to check port binding in pcap receiving program?


 
Thread Tools Search this Thread
Top Forums Programming how to check port binding in pcap receiving program?
# 1  
Old 08-13-2009
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 you.
# 2  
Old 08-13-2009
Pcap is a library to capture traffic coming in on a device for any port, not just a single one. It will even capture traffic to a TCP/UDP port that's not even open. This means that it won't bind to any single port, but will watch the traffic at a very low level. If you want to transfer data between two machines, use the OS networking routines (socket/bind/connect/...) instead of Pcap.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

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... (0 Replies)
Discussion started by: thmnetwork
0 Replies

2. 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

3. UNIX for Advanced & Expert Users

how to check port already used in pcap pgm

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,using bind return value we can able to check the port is already using or not. but, in pcap program how can i... (1 Reply)
Discussion started by: ram.sj
1 Replies

4. IP Networking

Binding the same port number on different interfaces

Hi, We can use the same port number for two applications based on protocols.(i.e one application is based on TCP and the other application based on UDP). But i don't know about interfaces, can anyone one help........ 1) Can we use same port number for different... (0 Replies)
Discussion started by: vijaypdp2006
0 Replies

5. IP Networking

Binding the port number.

Hi all, Application A is using an port number 100 and is binded to an interface 1. Application B is using an port number 100 and is binded to an interface 2. can we bind the two applications on same port number based on interfaces. what i want to know is two... (3 Replies)
Discussion started by: vijaypdp2006
3 Replies

6. UNIX for Dummies Questions & Answers

How do you check whether a port currently being used?

Hi, Please help me out, how to check whether a port currently being used or not. is there any command which give the result? Thanks Rajesh (6 Replies)
Discussion started by: rajesh08
6 Replies

7. IP Networking

i want a UDP Client receiving program

Hi I want a UDP client receiving program. Here is the scenario. The client has to listen to the UDP server and has to acknowledge back on receiving data from the server. Can anyone help me out. regards, Nirmala (1 Reply)
Discussion started by: Nirmala
1 Replies

8. Shell Programming and Scripting

Check sendmail is not receiving any emails

Hi all, Need some advise again. I am new to sendmail service which is already configured by some other administrators. I would need to write a script to check whether sendmail service is enabled in Solaris and Linux. Using this command "ps -ef | grep sendmail | grep -v grep". Or is there... (6 Replies)
Discussion started by: Kinki
6 Replies

9. Filesystems, Disks and Memory

Receiving status code 39 when accessing files through program.

I'm working on a project to extract some information from archive file. I ran my program through MFCobol animator and I'm receiving a status code of 39(file not compatible) when opening the file for input. I have tried just about everything, rebuild, convert, etc. but I receive the same message.... (6 Replies)
Discussion started by: bigdawg
6 Replies
Login or Register to Ask a Question