|
213 |
// so we call it "control." |
213 |
// so we call it "control." |
214 |
// |
214 |
// |
215 |
size_t msg_size = sizeof(int); |
215 |
size_t msg_size = sizeof(int); |
216 |
char control[CMSG_SPACE(msg_size)]; |
216 |
char* control = new char[CMSG_SPACE (msg_size)]; |
217 |
|
217 |
|
218 |
// |
218 |
// |
219 |
// There is a msghdr that is used to minimize the number of parameters |
219 |
// There is a msghdr that is used to minimize the number of parameters |
|
268 |
// Actually send the file descriptor back to the tap bridge. |
268 |
// Actually send the file descriptor back to the tap bridge. |
269 |
// |
269 |
// |
270 |
ssize_t len = sendmsg(sock, &msg, 0); |
270 |
ssize_t len = sendmsg(sock, &msg, 0); |
|
|
271 |
delete[] control; |
271 |
ABORT_IF (len == -1, "Could not send socket back to tap bridge", 1); |
272 |
ABORT_IF (len == -1, "Could not send socket back to tap bridge", 1); |
272 |
|
273 |
|
273 |
LOG ("sendmsg complete"); |
274 |
LOG ("sendmsg complete"); |