* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* mLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* mLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* You should have received a copy of the GNU Library General Public
* License along with mLib; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
* You should have received a copy of the GNU Library General Public
* License along with mLib; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
typedef struct pkbuf {
size_t sz; /* Size of current buffer */
size_t len; /* Length of data in the buffer */
size_t want; /* Want this many bytes for packet */
unsigned f; /* Various state flags */
typedef struct pkbuf {
size_t sz; /* Size of current buffer */
size_t len; /* Length of data in the buffer */
size_t want; /* Want this many bytes for packet */
unsigned f; /* Various state flags */
- void (*func)(octet */*b*/, size_t /*sz*/,
- struct pkbuf */*pk*/, size_t */*keep*/,
- void */*p*/); /* Handler function */
+ pkbuf_func *func; /* Handler function */
void *p; /* Argument for handler */
arena *a; /* Memory allocation arena */
octet *buf; /* Actual buffer space */
} pkbuf;
void *p; /* Argument for handler */
arena *a; /* Memory allocation arena */
octet *buf; /* Actual buffer space */
} pkbuf;
- * @void (*func)(octet *b, size_t sz, pkbuf *pk,@
- * @size_t *keep, void *p)@ =
- * handler function
+ * @pkbuf_func *func@ = handler function
-extern void pkbuf_init(pkbuf */*pk*/,
- void (*/*func*/)(octet */*b*/, size_t /*sz*/,
- pkbuf */*pk*/, size_t */*keep*/,
- void */*p*/),
- void */*p*/);
+extern void pkbuf_init(pkbuf */*pk*/, pkbuf_func */*func*/, void */*p*/);