X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=bmsocket%2Fbmsocket.c;h=c6809f82e615a75429f7aed73f540e8ac92015ab;hb=b29fa4df49237a7a8dae8bc82a27f4683254939b;hp=873f4fcacc8d68f68647ca2d67bc4e4dbe2de31a;hpb=7970328be9a695aecc4ecc1ea94bf686d256f1b7;p=vsys-wrappers.git diff --git a/bmsocket/bmsocket.c b/bmsocket/bmsocket.c index 873f4fc..c6809f8 100644 --- a/bmsocket/bmsocket.c +++ b/bmsocket/bmsocket.c @@ -7,7 +7,7 @@ #define VSYS_BMSOCKET "/vsys/fd_bmsocket.control" -int socket(int domain, int type, int protocol) +int CreateLargeBufSocket(int recvbuf, int sndbuf) { int sfd; struct sockaddr_un addr; @@ -31,6 +31,16 @@ int socket(int domain, int type, int protocol) exit(-1); } + /* passing the parameters */ + if (send(sfd, &recvbuf, sizeof(recvbuf), 0) != sizeof(recvbuf)) { + perror("Could not connect to Vsys control socket"); + exit(-1); + + } + if (send(sfd, &sndbuf, sizeof(sndbuf), 0) != sizeof(sndbuf)) { + perror("Could not connect to Vsys control socket"); + exit(-1); + } remotefd = receive_fd(sfd); return remotefd;