xref: /aosp_15_r20/external/tcpdump/signature.h (revision 05b00f6010a2396e3db2409989fc67270046269f)
1*05b00f60SXin Li /*
2*05b00f60SXin Li  * Redistribution and use in source and binary forms, with or without
3*05b00f60SXin Li  * modification, are permitted provided that: (1) source code
4*05b00f60SXin Li  * distributions retain the above copyright notice and this paragraph
5*05b00f60SXin Li  * in its entirety, and (2) distributions including binary code include
6*05b00f60SXin Li  * the above copyright notice and this paragraph in its entirety in
7*05b00f60SXin Li  * the documentation or other materials provided with the distribution.
8*05b00f60SXin Li  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
9*05b00f60SXin Li  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
10*05b00f60SXin Li  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11*05b00f60SXin Li  * FOR A PARTICULAR PURPOSE.
12*05b00f60SXin Li  *
13*05b00f60SXin Li  * Functions for signature and digest verification.
14*05b00f60SXin Li  *
15*05b00f60SXin Li  * Original code by Hannes Gredler ([email protected])
16*05b00f60SXin Li  */
17*05b00f60SXin Li 
18*05b00f60SXin Li /* for netdissect_options */
19*05b00f60SXin Li #include "netdissect.h"
20*05b00f60SXin Li 
21*05b00f60SXin Li /* signature checking result codes */
22*05b00f60SXin Li #define SIGNATURE_VALID		0
23*05b00f60SXin Li #define SIGNATURE_INVALID	1
24*05b00f60SXin Li #define CANT_ALLOCATE_COPY	2
25*05b00f60SXin Li #define CANT_CHECK_SIGNATURE	3
26*05b00f60SXin Li 
27*05b00f60SXin Li extern const struct tok signature_check_values[];
28*05b00f60SXin Li extern int signature_verify(netdissect_options *, const u_char *, u_int,
29*05b00f60SXin Li                             const u_char *, void (*)(void *), const void *);
30