Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

no of masquerded connection

Posted on 2000-03-03
4
Medium Priority
?
171 Views
Last Modified: 2010-04-22
how to get the no of masqueraded connection by programming in c under linux. (similar to 'ipchains -L -M' command in linux).
0
Comment
Question by:abhishekpatel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2580833
I'm not sure what you are asking? Do you mean that you want to know what the external IP is for a host behind an IP Masquerading box (i.e in the private address space)?
0
 

Author Comment

by:abhishekpatel
ID: 2582627
Edited text of question.
0
 

Expert Comment

by:javadp
ID: 2584309
you would edit ip_forward.c and using a array for saving the external packet and change the Src_IP and Src_Port and after incomming packet do reverse work.
0
 
LVL 10

Accepted Solution

by:
rbr earned 150 total points
ID: 2587156


FILE *fp;

char buffer[1000];

fp =popen ("ipchains -L -M","r");
while (NULL != fgets (buffer,999,fp)) {

/* Do what you want with the buffer
 * e.g. print it out */

   printf ("%s",buffer);
}
pclose (fp);
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question