Hello,
Please I try to apply the mechanism Interposition Function in Linux on the function write (write a socket) as follows:
Quote:
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <stdio.h>
# include <string.h>
int write (int n, char buffer [32], int sb)
{
int nb = write (so, "Ceci est un exemple de socket!!!", 32);
}
|
I also have the server code and client code, when the client connects to the server, the server sends a message to the client but when running I got the following error:
Erreur de segmentation
Have you an idea please ?
Thank you so much