From: Dustin Moore (axx@prodepa.gov.br)
Date: Wed Jul 18 2001 - 20:04:58 EEST
>STDIN is the correct place to read but there is a catch. AX.25, NET/ROM
>and ROSE are so called sequential packet protocols (as opposed to astream
>protocol like TCP) and thus each time you read from STDIN you need the
>read the whole packet. If you read only a part of it, the rest of it will
>be lost forever.
Ok, how do I know when to issue a read? It seems like if I issue reads
constantly this will bog down the system. So far I envision::
while (1) {
read(0,very_large_buf_,sizeof(very_large_buf));
/* Do work on buffer */
}
Also, if I read past where the fragment ends it seems to be that I will
get garbage. How do I know where the fragment ended?
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to terhi.victor@logonet.com
This archive was generated by hypermail 2b30 : Wed Jul 18 2001 - 20:05:58 EEST