1tcp_RegCatchall(3z)        z88dk Programmer's Manual       tcp_RegCatchall(3z)
2
3
4

NAME

6       tcp_RegCatchall - (De)register packet catcher
7

SYNOPSIS

9       #include <net/misc.h>
10
11       int tcp_RegCatchall(int libcall);
12

DESCRIPTION

14       The tcp_RegCatchall() function registers or deregisters a function that
15       is used to catch all incoming packets after it  has  passed  the  basic
16       tests of checksumming, length and ttl-checking.  l-checking.
17
18       The  parameter libcall is the ID for a shared library/packet call which
19       has the prototype thus:
20
21       bool_t Function(void *dp, size_t len);
22
23       Where dp is the address of the packet and len  is  the  length  of  the
24       packet. This function should return TRUE/FALSE to indicate to the ZSock
25       kernel whether the function has dealt with the packet and ZSock  should
26       not process it.
27
28

RETURN VALUE

30       tcp_RegCatchall() returns the previous ID of the catchall function.
31
32

NOTES

34       Should  you wish to stop calling your catchall function simply call the
35       function with an argument of NULL.
36
37       This function is of use should somebody write a driver for  an  as  yet
38       unsupported protocol.
39
40       The  package call should page in the ZSock data area using the function
41       tcp_pagein(3z).
42
43       This call could for example be used to  implement  a  traceroute  style
44       routine  to  catch ICMP replies. Returning TRUE when it has received an
45       ICMP reply packet of the correct tyoe, and FALSE otherwise.
46
47
48

SEE ALSO

50       tcp_pagein(3z), tcp_pageout(3z)
51
52

AUTHOR

54       Dominic Morris <dom@jb.man.ac.uk>
55
56
57
58
59                               18 February 2000            tcp_RegCatchall(3z)
Impressum