Notify avec /proc/net/tcp ou udp

hello

j’essaye de savoir quand une connection a changée dans /proc/net/tcp mai sa ne détecte rien
code compilable en c++

#ifndef DEF_ME_NOTIFY
#define DEF_ME_NOTIFY
#include <sys/select.h>
#include <sys/inotify.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string>
class c_notify
{
	public:
		c_notify();
		//renvoie 0 si tout ce termine normalment -1 si erreur
		// 1 si le changement a été detecter et s'arrete.
		int start_notify(const std::string & my_path);
	private:
		bool afficher_masque(int mask);
};

#endif //fin des macro
#include "notify.hpp"
c_notify::c_notify(){}

//int fd, wd;


bool c_notify::afficher_masque(int mask)
{
    if (mask & IN_ACCESS)			{ return true; }
	else if (mask & IN_MODIFY)		{ return true; }
    else if (mask & IN_ATTRIB)		{ return true; }
    else if (mask & IN_CLOSE)		{ return true; }
    else if (mask & IN_OPEN)		{ return true; }
    else if (mask & IN_MOVED_FROM)	{ return true; }
    else if (mask & IN_MOVED_TO)	{ return true; }
    else if (mask & IN_MOVE_SELF)	{ return true; }
    else if (mask & IN_DELETE)		{ return true; }
    else if (mask & IN_CREATE)		{ return true; }
    else if (mask & IN_DELETE_SELF)	{ return true; }
    else if (mask & IN_UNMOUNT)		{ return true; }
    else if (mask & IN_Q_OVERFLOW)	{ return true; }
    else if (mask & IN_IGNORED)		{ return true; }
    else if (mask & IN_ISDIR)		{ return true; }
    else { return false; }
}


int c_notify::start_notify(const std::string & my_path)
{
	size_t r;
    fd_set fds;
    char buffer[8192];
    struct inotify_event *event;
    int fd, wd;
    bool change=false;

    /* Initialisation d'inotify */
    fd = inotify_init();
    if (fd < 0) {
        perror("inotify_init");
        return -1;
    }

    /* Surveillance du fichier/répertoire passé en paramètre
     * On accepte tous les évènements possibles */
    wd = inotify_add_watch(fd, my_path.c_str(), IN_ALL_EVENTS);
    if (wd < 0) {
        perror("inotify_add_watch");
       return -1;
    }

    while (1) {
        FD_ZERO(&fds);
        FD_SET(fd, &fds);
        if (select(fd + 1, &fds, NULL, NULL, 0) <= 0) {
            continue;
        }

        /* Obtention des informations sur l'évènement qui vient de se produire */
        r = read(fd, buffer, sizeof(buffer));
        if (r <= 0) {
            perror("read");
       return -1;
        }

        event = (struct inotify_event *) buffer;
       // printf("Fichier surveillé n°%d\t", event->wd);
        change=afficher_masque(event->mask);
        if (change == true)
        {
			return 1;
		}
/*
        if (event->len) {
        //    printf("\tObjet : %s", event->name);
        }
        //printf("\n");
*/
    }

           return 0; //surveilliance terminée on revoie 0

}
#include <iostream>
#include <string>
#include "notify.hpp"
int main()
{

	c_notify c_n;
	std::string p;
	std::cout << "Démarrage" << std::endl;
	p="/proc/net/tcp";
	std::cout << "Stoop" << c_n.start_notify(p) <<std::endl;

}

si on lance un naviteur ou une session rien n’est detecter ??

Note attention un cat est trouver si vous passer des commande sur les fichier surveillier.

Merci d’avance