Skip to content

Commit

Permalink
conf.help created for ether-header, ARP, IPv6, ICMPv6, ND-RA
Browse files Browse the repository at this point in the history
  • Loading branch information
0xba1a committed Aug 17, 2013
1 parent 1b6b43e commit 28bd029
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 163 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pgen
conf.bak
2 changes: 2 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
* Read about NDisc options form update RFCs and attach.
* Have one more look at IPv6 extension headers
* Add support for type-1, type-2 routing headers
* Add support for short form of IPv6 prefix in RA prefix option
143 changes: 22 additions & 121 deletions conf
Original file line number Diff line number Diff line change
@@ -1,153 +1,54 @@
#Common
BUFF_SIZE=1024

#Packet Sending Information
IF_NAME=lo
PK_DST_MAC=00:01:9B:04:03:3C

#Ethernet header
ETHER_HEADER
DST_MAC=ff:ff:ff:ff:ff:ff
SRC_MAC=5C:D9:98:C1:8E:FE
#IPv6
ETHR_TYPE=34525
#ARP
#ETHR_TYPE=2054

/*
#ARP header
ARP
ARP_HW_TYPE=1
ARP_HW_LEN=6
ARP_PROTO_TYPE=2048
ARP_PROTO_LEN=4
ARP_OPCODE=1
ARP_SRC_MAC=5c:d9:98:c1:8e:fe
ARP_SRC_IP=0.0.0.0
ARP_DST_MAC=00:00:00:00:00:00
ARP_DST_IP=10.5.1.19
*/

#IPv6 header
IPV6
IPV6_VERSION=6
IPV6_TRAFFIC_CLASS=0
IPV6_FLOW_LABEL=0
IPV6_TRAFFIC_CLASS=255
IPV6_FLOW_LABEL=1234
IPV6_PAYLOAD_LENGTH=64
IPV6_NEXT_HEADER=58
IPV6_HOP_LIMIT=255
IPV6_SRC_ADDR=fe80::5ed9:98ff:fec1:8efe
IPV6_DST_ADDR=ff02::1
IPV6_HOP_LIMIT=128
IPV6_SRC_ADDR=fe80::213
IPV6_DST_ADDR=E23::9AD
IPV6_EXT_HDRS=0

/*
#Hop-by-Hop extention header
HOP_BY_HOP
HBH_NXT_HDR=0
HBH_HDR_EXT_LEN=1
HBH_OPTION=0x00010B0000000000000000000000

HOP_BY_HOP
HBH_NXT_HDR=60
HBH_HDR_EXT_LEN=0
HBH_OPTION=0x000103000000

DESTINATION_HEADER
DH_NXT_HDR=58
DH_HDR_EXT_LEN=0
DH_OPTION=0X000103000000
*/

ICMP6
ICMP6_TYPE=134
ICMP6_CODE=0
ICMP6_CHECKSUM=-1

NDISC_RA
NDISC_RA_CUR_HOP_LIMIT=64
NDISC_RA_M_FLAG=0
NDISC_RA_O_FLAG=0
NDISC_RA_ROUTER_LIFETIME=0
NDISC_RA_REACHABLE_TIME=0
NDISC_RA_RETRANS_TIMER=0
NDISC_RA_CUR_HOP_LIMIT=124
NDISC_RA_M_FLAG=1
NDISC_RA_O_FLAG=1
NDISC_RA_ROUTER_LIFETIME=1223
NDISC_RA_REACHABLE_TIME=2342
NDISC_RA_RETRANS_TIMER=45543
NDISC_RA_OPTION_NUM=3

NDISC_RA_OPTION=NDISC_RA_PREFIX_INFO
NDISC_RA_OP_TYPE=3
NDISC_RA_OP_LEN=4
NDISC_RA_PREFIX_LEN=64
NDISC_RA_L_FLAG=1
NDISC_RA_A_FLAG=1
NDISC_RA_PREFIX_VALID_LIFETIME=86400
NDISC_RA_PREFIX_PREFERRED_LIFETIME=14400
NDISC_RA_PREFIX=2013
NDISC_RA_A_FLAG=0
NDISC_RA_PREFIX_VALID_LIFETIME=12345
NDISC_RA_PREFIX_PREFERRED_LIFETIME=54321
NDISC_RA_PREFIX=2001:23

NDISC_RA_OPTION=NDISC_RA_SRC_LINK_ADDR
NDISC_RA_OP_TYPE=1
NDISC_RA_OP_LEN=1
NDISC_RA_OP_SRC_LINK_ADDR=5C:D9:98:C1:8E:FE
NDISC_RA_OPTION=NDISC_RA_MTU
NDISC_RA_TYPE=5
NDISC_RA_LEN=1
NDISC_RA_MTU=1500

/*
NDISC_RS
NDISC_RS_OPTION=NDISC_RS_SRC_LINK_ADDR
NDISC_RS_OP_TYPE=1
NDISC_RS_OP_LEN=1
NDISC_RS_OP_LEN_ORIG=1
NDISC_RS_OP_SRC_LINK_ADDR=5C:D9:98:C1:8E:FE
*/
NDISC_RA_OP_SRC_LINK_ADDR=00:01:02:03:04:05

/*
NDISC_NS
NDISC_NS_TARGET_ADDR=2010::11
NDISC_NS_OPTION=NDISC_NS_SRC_LINK_ADDR
NDISC_NS_OP_TYPE=1
NDISC_NS_OP_LEN=1
NDISC_NS_OP_SRC_LINK_ADDR=5C:D9:98:C1:8E:FE
*/

/*
NDISC_NA
NDISC_NA_R=1
NDISC_NA_S=0
NDISC_NA_O=0
NDISC_NA_TARGET_ADDR=fe80::5ed9:98ff:fec1:8efe
NDISC_NA_OPTION=NDISC_NA_SRC_LINK_ADDR
NDISC_NA_OP_TYPE=1
NDISC_NA_OP_LEN=1
NDISC_NA_OP_TAR_LINK_ADDR=5C:D9:98:C1:8E:FE
*/

/*
ECHO_REQ
ECHO6_IDENTIFIER=13082
ECHO6_SEQ=0
ECHO6_DATA=NO_DATA
*/

/*
ROUTING_HEADER
RH_NXT_HDR=58
RH_EXT_LEN=4
RH_TYPE=0
RH_SEG_LEFT=2
RH_DATA
RH_ADDR=ff02::1:ff04:33c
RH_ADDR=fe80::2

FRAGMENT_HEADER
FH_NXT_HDR=58
FH_OFFSET=522
FH_M_FLAG=0
FH_IDENTIFICATION=345

#ICMPv6 header
ICMP6=0
ICMP6_TYPE=135
ICMP6_CODE=0
#give -1 for pgen to calculate checksum
ICMP6_CHECKSUM=53224
#Usually same as ICMP6_TYPE
ICMP6_BODY_TYPE=135
*/
NDISC_RA_OPTION=NDISC_RA_MTU
NDISC_RA_OP_TYPE=5
NDISC_RA_OP_LEN=1
NDISC_RA_MTU=245
Loading

0 comments on commit 28bd029

Please sign in to comment.