Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <net/checksum.h>
#include <net/udp.h>
#include <net/netfilter/nf_nat.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_nat_helper.h>
#include <linux/netfilter/nf_conntrack_snmp.h>
Go to the source code of this file.
Data Structures | |
struct | oct1_map |
struct | asn1_ctx |
struct | asn1_octstr |
union | snmp_syntax |
struct | snmp_object |
struct | snmp_request |
struct | snmp_v1_trap |
struct | snmp_cnv |
Macros | |
#define | SNMP_PORT 161 |
#define | SNMP_TRAP_PORT 162 |
#define | NOCT1(n) (*(u8 *)(n)) |
#define | ASN1_UNI 0 /* Universal */ |
#define | ASN1_APL 1 /* Application */ |
#define | ASN1_CTX 2 /* Context */ |
#define | ASN1_PRV 3 /* Private */ |
#define | ASN1_EOC 0 /* End Of Contents */ |
#define | ASN1_BOL 1 /* Boolean */ |
#define | ASN1_INT 2 /* Integer */ |
#define | ASN1_BTS 3 /* Bit String */ |
#define | ASN1_OTS 4 /* Octet String */ |
#define | ASN1_NUL 5 /* Null */ |
#define | ASN1_OJI 6 /* Object Identifier */ |
#define | ASN1_OJD 7 /* Object Description */ |
#define | ASN1_EXT 8 /* External */ |
#define | ASN1_SEQ 16 /* Sequence */ |
#define | ASN1_SET 17 /* Set */ |
#define | ASN1_NUMSTR 18 /* Numerical String */ |
#define | ASN1_PRNSTR 19 /* Printable String */ |
#define | ASN1_TEXSTR 20 /* Teletext String */ |
#define | ASN1_VIDSTR 21 /* Video String */ |
#define | ASN1_IA5STR 22 /* IA5 String */ |
#define | ASN1_UNITIM 23 /* Universal Time */ |
#define | ASN1_GENTIM 24 /* General Time */ |
#define | ASN1_GRASTR 25 /* Graphical String */ |
#define | ASN1_VISSTR 26 /* Visible String */ |
#define | ASN1_GENSTR 27 /* General String */ |
#define | ASN1_PRI 0 /* Primitive */ |
#define | ASN1_CON 1 /* Constructed */ |
#define | ASN1_ERR_NOERROR 0 |
#define | ASN1_ERR_DEC_EMPTY 2 |
#define | ASN1_ERR_DEC_EOC_MISMATCH 3 |
#define | ASN1_ERR_DEC_LENGTH_MISMATCH 4 |
#define | ASN1_ERR_DEC_BADVALUE 5 |
#define | SNMP_V1 0 |
#define | SNMP_V2C 1 |
#define | SNMP_V2 2 |
#define | SNMP_V3 3 |
#define | SNMP_SIZE_COMM 256 |
#define | SNMP_SIZE_OBJECTID 128 |
#define | SNMP_SIZE_BUFCHR 256 |
#define | SNMP_SIZE_BUFINT 128 |
#define | SNMP_SIZE_SMALLOBJECTID 16 |
#define | SNMP_PDU_GET 0 |
#define | SNMP_PDU_NEXT 1 |
#define | SNMP_PDU_RESPONSE 2 |
#define | SNMP_PDU_SET 3 |
#define | SNMP_PDU_TRAP1 4 |
#define | SNMP_PDU_BULK 5 |
#define | SNMP_PDU_INFORM 6 |
#define | SNMP_PDU_TRAP2 7 |
#define | SNMP_NOERROR 0 |
#define | SNMP_TOOBIG 1 |
#define | SNMP_NOSUCHNAME 2 |
#define | SNMP_BADVALUE 3 |
#define | SNMP_READONLY 4 |
#define | SNMP_GENERROR 5 |
#define | SNMP_NOACCESS 6 |
#define | SNMP_WRONGTYPE 7 |
#define | SNMP_WRONGLENGTH 8 |
#define | SNMP_WRONGENCODING 9 |
#define | SNMP_WRONGVALUE 10 |
#define | SNMP_NOCREATION 11 |
#define | SNMP_INCONSISTENTVALUE 12 |
#define | SNMP_RESOURCEUNAVAILABLE 13 |
#define | SNMP_COMMITFAILED 14 |
#define | SNMP_UNDOFAILED 15 |
#define | SNMP_AUTHORIZATIONERROR 16 |
#define | SNMP_NOTWRITABLE 17 |
#define | SNMP_INCONSISTENTNAME 18 |
#define | SNMP_TRAP_COLDSTART 0 |
#define | SNMP_TRAP_WARMSTART 1 |
#define | SNMP_TRAP_LINKDOWN 2 |
#define | SNMP_TRAP_LINKUP 3 |
#define | SNMP_TRAP_AUTFAILURE 4 |
#define | SNMP_TRAP_EQPNEIGHBORLOSS 5 |
#define | SNMP_TRAP_ENTSPECIFIC 6 |
#define | SNMP_NULL 0 |
#define | SNMP_INTEGER 1 /* l */ |
#define | SNMP_OCTETSTR 2 /* c */ |
#define | SNMP_DISPLAYSTR 2 /* c */ |
#define | SNMP_OBJECTID 3 /* ul */ |
#define | SNMP_IPADDR 4 /* uc */ |
#define | SNMP_COUNTER 5 /* ul */ |
#define | SNMP_GAUGE 6 /* ul */ |
#define | SNMP_TIMETICKS 7 /* ul */ |
#define | SNMP_OPAQUE 8 /* c */ |
#define | SNMP_UINTEGER 5 /* ul */ |
#define | SNMP_BITSTR 9 /* uc */ |
#define | SNMP_NSAP 10 /* uc */ |
#define | SNMP_COUNTER64 11 /* ul */ |
#define | SNMP_NOSUCHOBJECT 12 |
#define | SNMP_NOSUCHINSTANCE 13 |
#define | SNMP_ENDOFMIBVIEW 14 |
#define | SNMP_IPA 0 |
#define | SNMP_CNT 1 |
#define | SNMP_GGE 2 |
#define | SNMP_TIT 3 |
#define | SNMP_OPQ 4 |
#define | SNMP_C64 6 |
#define | SERR_NSO 0 |
#define | SERR_NSI 1 |
#define | SERR_EOM 2 |
Functions | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("James Morris <[email protected]>") | |
MODULE_DESCRIPTION ("Basic SNMP Application Layer Gateway") | |
MODULE_ALIAS ("ip_nat_snmp_basic") | |
module_init (nf_nat_snmp_basic_init) | |
module_exit (nf_nat_snmp_basic_fini) | |
module_param (debug, int, 0600) | |
#define ASN1_APL 1 /* Application */ |
Definition at line 91 of file nf_nat_snmp_basic.c.
#define ASN1_BOL 1 /* Boolean */ |
Definition at line 97 of file nf_nat_snmp_basic.c.
Definition at line 99 of file nf_nat_snmp_basic.c.
#define ASN1_CON 1 /* Constructed */ |
Definition at line 120 of file nf_nat_snmp_basic.c.
#define ASN1_CTX 2 /* Context */ |
Definition at line 92 of file nf_nat_snmp_basic.c.
#define ASN1_EOC 0 /* End Of Contents */ |
Definition at line 96 of file nf_nat_snmp_basic.c.
#define ASN1_ERR_DEC_BADVALUE 5 |
Definition at line 129 of file nf_nat_snmp_basic.c.
#define ASN1_ERR_DEC_EMPTY 2 |
Definition at line 126 of file nf_nat_snmp_basic.c.
#define ASN1_ERR_DEC_EOC_MISMATCH 3 |
Definition at line 127 of file nf_nat_snmp_basic.c.
#define ASN1_ERR_DEC_LENGTH_MISMATCH 4 |
Definition at line 128 of file nf_nat_snmp_basic.c.
#define ASN1_ERR_NOERROR 0 |
Definition at line 125 of file nf_nat_snmp_basic.c.
#define ASN1_EXT 8 /* External */ |
Definition at line 104 of file nf_nat_snmp_basic.c.
#define ASN1_GENSTR 27 /* General String */ |
Definition at line 116 of file nf_nat_snmp_basic.c.
#define ASN1_GENTIM 24 /* General Time */ |
Definition at line 113 of file nf_nat_snmp_basic.c.
#define ASN1_GRASTR 25 /* Graphical String */ |
Definition at line 114 of file nf_nat_snmp_basic.c.
#define ASN1_IA5STR 22 /* IA5 String */ |
Definition at line 111 of file nf_nat_snmp_basic.c.
#define ASN1_INT 2 /* Integer */ |
Definition at line 98 of file nf_nat_snmp_basic.c.
#define ASN1_NUL 5 /* Null */ |
Definition at line 101 of file nf_nat_snmp_basic.c.
#define ASN1_NUMSTR 18 /* Numerical String */ |
Definition at line 107 of file nf_nat_snmp_basic.c.
#define ASN1_OJD 7 /* Object Description */ |
Definition at line 103 of file nf_nat_snmp_basic.c.
#define ASN1_OJI 6 /* Object Identifier */ |
Definition at line 102 of file nf_nat_snmp_basic.c.
#define ASN1_OTS 4 /* Octet String */ |
Definition at line 100 of file nf_nat_snmp_basic.c.
#define ASN1_PRI 0 /* Primitive */ |
Definition at line 119 of file nf_nat_snmp_basic.c.
#define ASN1_PRNSTR 19 /* Printable String */ |
Definition at line 108 of file nf_nat_snmp_basic.c.
#define ASN1_PRV 3 /* Private */ |
Definition at line 93 of file nf_nat_snmp_basic.c.
#define ASN1_SEQ 16 /* Sequence */ |
Definition at line 105 of file nf_nat_snmp_basic.c.
#define ASN1_SET 17 /* Set */ |
Definition at line 106 of file nf_nat_snmp_basic.c.
#define ASN1_TEXSTR 20 /* Teletext String */ |
Definition at line 109 of file nf_nat_snmp_basic.c.
#define ASN1_UNI 0 /* Universal */ |
Definition at line 90 of file nf_nat_snmp_basic.c.
#define ASN1_UNITIM 23 /* Universal Time */ |
Definition at line 112 of file nf_nat_snmp_basic.c.
#define ASN1_VIDSTR 21 /* Video String */ |
Definition at line 110 of file nf_nat_snmp_basic.c.
#define ASN1_VISSTR 26 /* Visible String */ |
Definition at line 115 of file nf_nat_snmp_basic.c.
Definition at line 66 of file nf_nat_snmp_basic.c.
#define SERR_EOM 2 |
Definition at line 618 of file nf_nat_snmp_basic.c.
#define SERR_NSI 1 |
Definition at line 617 of file nf_nat_snmp_basic.c.
#define SERR_NSO 0 |
Definition at line 616 of file nf_nat_snmp_basic.c.
#define SNMP_AUTHORIZATIONERROR 16 |
Definition at line 539 of file nf_nat_snmp_basic.c.
#define SNMP_BADVALUE 3 |
Definition at line 526 of file nf_nat_snmp_basic.c.
#define SNMP_BITSTR 9 /* uc */ |
Definition at line 566 of file nf_nat_snmp_basic.c.
#define SNMP_C64 6 |
Definition at line 613 of file nf_nat_snmp_basic.c.
#define SNMP_CNT 1 |
Definition at line 609 of file nf_nat_snmp_basic.c.
#define SNMP_COMMITFAILED 14 |
Definition at line 537 of file nf_nat_snmp_basic.c.
#define SNMP_COUNTER 5 /* ul */ |
Definition at line 559 of file nf_nat_snmp_basic.c.
#define SNMP_COUNTER64 11 /* ul */ |
Definition at line 568 of file nf_nat_snmp_basic.c.
#define SNMP_DISPLAYSTR 2 /* c */ |
Definition at line 556 of file nf_nat_snmp_basic.c.
#define SNMP_ENDOFMIBVIEW 14 |
Definition at line 571 of file nf_nat_snmp_basic.c.
#define SNMP_GAUGE 6 /* ul */ |
Definition at line 560 of file nf_nat_snmp_basic.c.
#define SNMP_GENERROR 5 |
Definition at line 528 of file nf_nat_snmp_basic.c.
#define SNMP_GGE 2 |
Definition at line 610 of file nf_nat_snmp_basic.c.
#define SNMP_INCONSISTENTNAME 18 |
Definition at line 541 of file nf_nat_snmp_basic.c.
#define SNMP_INCONSISTENTVALUE 12 |
Definition at line 535 of file nf_nat_snmp_basic.c.
#define SNMP_INTEGER 1 /* l */ |
Definition at line 554 of file nf_nat_snmp_basic.c.
#define SNMP_IPA 0 |
Definition at line 608 of file nf_nat_snmp_basic.c.
#define SNMP_IPADDR 4 /* uc */ |
Definition at line 558 of file nf_nat_snmp_basic.c.
#define SNMP_NOACCESS 6 |
Definition at line 529 of file nf_nat_snmp_basic.c.
#define SNMP_NOCREATION 11 |
Definition at line 534 of file nf_nat_snmp_basic.c.
#define SNMP_NOERROR 0 |
Definition at line 523 of file nf_nat_snmp_basic.c.
#define SNMP_NOSUCHINSTANCE 13 |
Definition at line 570 of file nf_nat_snmp_basic.c.
#define SNMP_NOSUCHNAME 2 |
Definition at line 525 of file nf_nat_snmp_basic.c.
#define SNMP_NOSUCHOBJECT 12 |
Definition at line 569 of file nf_nat_snmp_basic.c.
#define SNMP_NOTWRITABLE 17 |
Definition at line 540 of file nf_nat_snmp_basic.c.
#define SNMP_NSAP 10 /* uc */ |
Definition at line 567 of file nf_nat_snmp_basic.c.
#define SNMP_NULL 0 |
Definition at line 553 of file nf_nat_snmp_basic.c.
#define SNMP_OBJECTID 3 /* ul */ |
Definition at line 557 of file nf_nat_snmp_basic.c.
#define SNMP_OCTETSTR 2 /* c */ |
Definition at line 555 of file nf_nat_snmp_basic.c.
#define SNMP_OPAQUE 8 /* c */ |
Definition at line 562 of file nf_nat_snmp_basic.c.
#define SNMP_OPQ 4 |
Definition at line 612 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_BULK 5 |
Definition at line 518 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_GET 0 |
Definition at line 513 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_INFORM 6 |
Definition at line 519 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_NEXT 1 |
Definition at line 514 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_RESPONSE 2 |
Definition at line 515 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_SET 3 |
Definition at line 516 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_TRAP1 4 |
Definition at line 517 of file nf_nat_snmp_basic.c.
#define SNMP_PDU_TRAP2 7 |
Definition at line 520 of file nf_nat_snmp_basic.c.
#define SNMP_PORT 161 |
Definition at line 64 of file nf_nat_snmp_basic.c.
#define SNMP_READONLY 4 |
Definition at line 527 of file nf_nat_snmp_basic.c.
#define SNMP_RESOURCEUNAVAILABLE 13 |
Definition at line 536 of file nf_nat_snmp_basic.c.
#define SNMP_SIZE_BUFCHR 256 |
Definition at line 508 of file nf_nat_snmp_basic.c.
#define SNMP_SIZE_BUFINT 128 |
Definition at line 509 of file nf_nat_snmp_basic.c.
#define SNMP_SIZE_COMM 256 |
Definition at line 506 of file nf_nat_snmp_basic.c.
#define SNMP_SIZE_OBJECTID 128 |
Definition at line 507 of file nf_nat_snmp_basic.c.
#define SNMP_SIZE_SMALLOBJECTID 16 |
Definition at line 510 of file nf_nat_snmp_basic.c.
#define SNMP_TIMETICKS 7 /* ul */ |
Definition at line 561 of file nf_nat_snmp_basic.c.
#define SNMP_TIT 3 |
Definition at line 611 of file nf_nat_snmp_basic.c.
#define SNMP_TOOBIG 1 |
Definition at line 524 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_AUTFAILURE 4 |
Definition at line 548 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_COLDSTART 0 |
Definition at line 544 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_ENTSPECIFIC 6 |
Definition at line 550 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_EQPNEIGHBORLOSS 5 |
Definition at line 549 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_LINKDOWN 2 |
Definition at line 546 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_LINKUP 3 |
Definition at line 547 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_PORT 162 |
Definition at line 65 of file nf_nat_snmp_basic.c.
#define SNMP_TRAP_WARMSTART 1 |
Definition at line 545 of file nf_nat_snmp_basic.c.
#define SNMP_UINTEGER 5 /* ul */ |
Definition at line 565 of file nf_nat_snmp_basic.c.
#define SNMP_UNDOFAILED 15 |
Definition at line 538 of file nf_nat_snmp_basic.c.
#define SNMP_V1 0 |
Definition at line 500 of file nf_nat_snmp_basic.c.
#define SNMP_V2 2 |
Definition at line 502 of file nf_nat_snmp_basic.c.
#define SNMP_V2C 1 |
Definition at line 501 of file nf_nat_snmp_basic.c.
#define SNMP_V3 3 |
Definition at line 503 of file nf_nat_snmp_basic.c.
#define SNMP_WRONGENCODING 9 |
Definition at line 532 of file nf_nat_snmp_basic.c.
#define SNMP_WRONGLENGTH 8 |
Definition at line 531 of file nf_nat_snmp_basic.c.
#define SNMP_WRONGTYPE 7 |
Definition at line 530 of file nf_nat_snmp_basic.c.
#define SNMP_WRONGVALUE 10 |
Definition at line 533 of file nf_nat_snmp_basic.c.
MODULE_ALIAS | ( | "ip_nat_snmp_basic" | ) |
MODULE_AUTHOR | ( | "James Morris <[email protected]>" | ) |
MODULE_DESCRIPTION | ( | "Basic SNMP Application Layer Gateway" | ) |
module_exit | ( | nf_nat_snmp_basic_fini | ) |
module_init | ( | nf_nat_snmp_basic_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |