In article <[EMAIL PROTECTED]>,
klein fabien  <[EMAIL PROTECTED]> wrote:
>hi
>
>
>Can someone help me to do(in the easiest way possible ) a thing like
>this:
>
>1.configure a serial port for a specific speed

fd = open(port, O_RWWR | O_NONBLOCK);
fcntl(fd, F_SETFL, O_RDWR);
tcsetattr(fd, attr);

See man termios(3)

>2.wake up a process when data arrive
>3.process read the buffer and sleep again

while ((n = read(fd, buf, sizeof(buf))) != 0) {
        if (n < 0) {
                /* handle error and break/continue */
        }
        do_something();
}

>that's all

Yup, but what does it have to do with the Linux networking stack ?

Mike.
-- 
Beware of Programmers who carry screwdrivers.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to