|
|
1.1 ! root 1: .TH CONNLD 4 ! 2: .CT 2 sa comm_proc ! 3: .SH NAME ! 4: conn_ld \- line discipline for unique stream connection ! 5: .SH SYNOPSIS ! 6: .B #include <sys/filio.h> ! 7: .SH DESCRIPTION ! 8: This line discipline ! 9: provides unique connections ! 10: to a server. ! 11: The server process should push the line discipline on a pipe ! 12: (see ! 13: .B FIOPUSHLD ! 14: in ! 15: .IR stream (4)) ! 16: and ! 17: .IR fmount (2) ! 18: the pipe end on a file. ! 19: A subsequent attempt to ! 20: .IR open (2) ! 21: or ! 22: .IR creat ! 23: that file causes a new pipe to be created. ! 24: A file descriptor for one ! 25: end of the new pipe is passed on the mounted pipe to ! 26: to the server process as if by ! 27: .BR FIOSNDFD ; ! 28: see ! 29: .IR stream (4). ! 30: The ! 31: opening process ! 32: is blocked until the server responds. ! 33: The server should receive the passed file descriptor with ! 34: .RB FIORCVFD ! 35: and respond in one of the following ways: ! 36: .IP \(em ! 37: Accept the new file descriptor by performing ! 38: .RS ! 39: .IP ! 40: .L ! 41: ioctl(fd, FIOACCEPT, (void *)0); ! 42: .RE ! 43: .IP ! 44: The originating ! 45: .I open ! 46: completes and returns a file descriptor for the ! 47: other end of the new pipe. ! 48: .IP \(em ! 49: Write some data on the new file descriptor. ! 50: This performs an implicit ! 51: .LR FIOACCEPT . ! 52: .IP \(em ! 53: Pass a different file descriptor: ! 54: .RS ! 55: .IP ! 56: .L ! 57: ioctl(fd, FIOSNDFD, &newfd); ! 58: .RE ! 59: .IP ! 60: The originator's end of the new pipe is closed, ! 61: and a file descriptor for the open file ! 62: designated by ! 63: .I newfd ! 64: is returned to the originating ! 65: .IR open . ! 66: .IP \(em ! 67: Reject the connection, ! 68: by closing the new file descriptor ! 69: or by performing ! 70: .RS ! 71: .IP ! 72: .L ! 73: ioctl(fd, FIOREJECT, (void *)0); ! 74: .RE ! 75: .IP ! 76: The originating ! 77: .I open ! 78: fails with ! 79: .BR ENXIO ! 80: and the new pipe is discarded. ! 81: .SH SEE ALSO ! 82: .IR fmount (2), ! 83: .IR stream (4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.