Search Results

Search found 5 results on 1 pages for 'astha'.

Page 1/1 | 1 

  • how to get ipaddress of my computer

    - by astha goyal
    hello i want to knw the ipaddress of my computer. /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' this command gives the ipaddress of my computer and print result on console but i want it in a varible sothat i can use it in my C program. How can i do that.

    Read the article

  • How to use sprintf instead of hardcoded values

    - by astha goyal
    I am developing a firewall for Linux as my project. I am able to capture packets and to block them. I am using IPTABLES. How can I use variables with sprintf instead of hardcoded values? sprintf(comm, "iptables -A INPUT -s $str -j DROP") // inplace of: sprintf(comm, "iptables -A INPUT -s 192.168.0.43 -j DROP")

    Read the article

1