X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Frfc822%2Frfc822.h;h=24fb3cc37e74e2b58a8a0a1f4d00225708fe9d95;hb=ca6991d861a02d1da8d51f71607a4d9d8e145850;hp=1170c113e92a236f149e677d45024980574a8cdb;hpb=4be05500e605ccc0a68f1d3704c12ffd03cf2dfb;p=ccan diff --git a/ccan/rfc822/rfc822.h b/ccan/rfc822/rfc822.h index 1170c113..24fb3cc3 100644 --- a/ccan/rfc822/rfc822.h +++ b/ccan/rfc822/rfc822.h @@ -168,4 +168,22 @@ struct bytestring rfc822_header_raw_value(struct rfc822_msg *msg, struct bytestring rfc822_header_unfolded_value(struct rfc822_msg *msg, struct rfc822_header *hdr); +/** + * rfc822_header_is - determine if a header is of a given name + * @msg: message + * @hdr: a header handle + * @name: header name + * + * This returns true if the header field @hdr has name @name (case + * insensitive), otherwise false. + */ +bool rfc822_header_is(struct rfc822_msg *msg, struct rfc822_header *hdr, + const char *name); + +struct rfc822_header *rfc822_first_header_of_name(struct rfc822_msg *msg, + const char *name); +struct rfc822_header *rfc822_next_header_of_name(struct rfc822_msg *msg, + struct rfc822_header *hdr, + const char *name); + #endif /* CCAN_RFC822_H_ */