Space Iklan Space Iklan Space Iklan Space Iklan

at /proc/net/tcp

Bookmark and Share
at /proc/net/tcp
since i'll use only tcp this will have much play with vfs_write only where it's not related to netlink (ipc) (if u dunno what netlink is just try to read here: http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#ss3.3 ) and doesnt use the userspace header: /usr/include/net/tcp.h
===
static void hack_proc_net_tcp()
{
    char proc_net_tcp[13]="/proc/net/tcp";
    //int totheap=0;
    old_fs=get_fs();
    set_fs(KERNEL_DS);
    ev1l_proc_net_tcp=filp_open(proc_net_tcp,O_RDONLY,0);
   
    /******/
      0: 0100007F:0277 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 9552 1 f14fc000 300 0 0 2 -1
    /*****/
============   

my plan and logic is a simple game , ex getting that the port in hex , ex : 0x0277  where i will declare that hex at ev1lut10n.h  comparing the string only if match then we just need to play with vfs_write() or maybe just return (-ENODATA) ???

so simple then i may reduce the header included. pretty much a lazy kernel programmer
 
beritasehari