libipt: keep internal encode functions

Rewrite existing pt_encode_~() functions to use pt_encode() internally.

This also adds an external convenience function for filling in the mode.exec
bits given a pt_exec_mode.

Change-Id: I2b0eb34726ebe7673d3840b098b99e399024a748
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
libipt: get rid of pt_decode() and pt_advance()

No need to split packet decoding internally.

Change-Id: I576bee4b52a57c9b7d75d074ffcba8babf2d9abb
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
libipt: rename pt_encode() to pt_enc_next()

The current name does not fit into the general naming scheme.  Fix it.

Change-Id: Ic3c9632216e6b4b6ee7b20ec58b93e4c0b805b81
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
libipt: remove dead declaration

The pt_skip_psb_payload() function declared in pt_packet_decode.h is neither
defined nor used.   Remove the declaration.

Change-Id: Iefeb31334780a89e0f3b9d32c0a0d05af04d498a
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>