esp.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 56 行

HH
56
字号
#ifndef CLICK_IPSEC_ESP_HH#define CLICK_IPSEC_ESP_HH#include <click/element.hh>#include <click/atomic.hh>#include <click/glue.hh>CLICK_DECLS/* * =c * IPsecESPEncap(SPI) * =s encapsulation * apply IPSec encapsulation * =d *  * Adds IPsec ESP header to packet. assign SPI as the security parameters * index. Block size is set to 8 bytes. The packet will be padded to be * multiples of 8 bytes. Padding uses the default padding scheme specified in * RFC 2406: pad[0] = 1, pad[1] = 2, pad[2] = 3, etc. * * The ESP header added to the packet includes the 32 bit SPI, 32 bit replay * counter, and 64 bit Integrity Vector (IV). * * =a IPsecESPUnencap, IPsecAuthSHA1, IPsecDES  */struct esp_new {   uint32_t esp_spi;  uint32_t esp_rpl;  uint8_t esp_iv[8];};class IPsecESPEncap : public Element {public:  IPsecESPEncap();  IPsecESPEncap(int spi);  ~IPsecESPEncap();    const char *class_name() const	{ return "IPsecESPEncap"; }  const char *processing() const	{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);  int initialize(ErrorHandler *);  Packet *simple_action(Packet *);  private:  int _spi;  atomic_uint32_t _rpl;  enum { BLKS = 8 };};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?