Advertisement
TJvV

gdb cfgparser

Jun 23rd, 2013
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.99 KB | None | 0 0
  1. /*--------------\
  2. | GDB output |
  3. \--------------*/
  4. (gdb) break abort
  5. Function "abort" not defined.
  6. Make breakpoint pending on future shared library load? (y or [n]) y
  7. Breakpoint 1 (abort) pending.
  8. (gdb) r olsrd.conf
  9. Starting program: /home/user/olsr/olsrd/src/cfgparser/olsrd_cfgparser olsrd.conf
  10. Parsing file: "olsrd.conf"
  11.  
  12. Program received signal SIGSEGV, Segmentation fault.
  13. 0x0804e3d6 in yyparse () at oparse.y:818
  14. 818 olsr_cnf->debug_level = $2->integer;
  15. (gdb) bt
  16. #0 0x0804e3d6 in yyparse () at oparse.y:818
  17. #1 0x08049c00 in olsrd_parse_cnf (filename=0xbffff552 "olsrd.conf") at olsrd_conf.c:147
  18. #2 0x08049ad6 in main (argc=2, argv=0xbffff3a4) at olsrd_conf.c:108
  19. (gdb) l
  20. 813 }
  21. 814 ;
  22. 815
  23. 816 idebug: TOK_DEBUGLEVEL TOK_INTEGER
  24. 817 {
  25. 818 olsr_cnf->debug_level = $2->integer;
  26. 819 PARSER_DEBUG_PRINTF("Debug level: %d\n", olsr_cnf->debug_level);
  27. 820 free($2);
  28. 821 }
  29. 822 ;
  30. (gdb) p olsr_cnf
  31. $1 = (struct olsrd_config *) 0x0
  32. ===================================================================================
  33. /*--------------\
  34. | olsrd.conf |
  35. \--------------*/
  36.  
  37. #
  38. # olsr.org OLSR daemon config file
  39. #
  40. # Lines starting with a # are discarded
  41. #
  42. # This file was shipped with the debian olsrd package
  43. #
  44.  
  45. # This file is an example of a typical
  46. # configuration for a mostly static
  47. # network(regarding mobility) using
  48. # the LQ extention
  49.  
  50. # Debug level(0-9)
  51. # If set to 0 the daemon runs in the background
  52.  
  53. DebugLevel 0
  54.  
  55.  
  56. # Interfaces and their rules
  57. # Omitted options will be set to the
  58. # default values. Multiple interfaces
  59. # can be specified in the same block
  60. # and multiple blocks can be set.
  61.  
  62. # !!CHANGE THE INTERFACE LABEL(s) TO MATCH YOUR INTERFACE(s)!!
  63. # (eg. wlan0 or eth1):
  64. #
  65. # this is (in most cases) the only configuration you need to change
  66.  
  67. #Interface "eth1" "eth0" "wlan0" "wlan1" "ath0" "ath1"
  68. Interface "eth1"
  69. {
  70.  
  71. # IPv4 broadcast address to use. The
  72. # one usefull example would be 255.255.255.255
  73. # If not defined the broadcastaddress
  74. # every card is configured with is used
  75.  
  76. # Ip4Broadcast 255.255.255.255
  77.  
  78. # IPv6 address scope to use.
  79. # Must be 'site-local' or 'global'
  80.  
  81. # Ip6AddrType site-local
  82.  
  83. # IPv6 multicast address to use when
  84. # using site-local addresses.
  85. # If not defined, ff05::15 is used
  86.  
  87. # Ip6MulticastSite ff05::11
  88.  
  89. # IPv6 multicast address to use when
  90. # using global addresses
  91. # If not defined, ff0e::1 is used
  92.  
  93. # Ip6MulticastGlobal ff0e::1
  94.  
  95.  
  96. # Emission intervals.
  97. # If not defined, RFC proposed values will
  98. # be used in most cases.
  99.  
  100. # Hello interval in seconds(float)
  101. HelloInterval 6.0
  102.  
  103. # HELLO validity time
  104. HelloValidityTime 600.0
  105.  
  106. # TC interval in seconds(float)
  107. TcInterval 0.5
  108.  
  109. # TC validity time
  110. TcValidityTime 300.0
  111.  
  112. # MID interval in seconds(float)
  113. MidInterval 10.0
  114.  
  115. # MID validity time
  116. MidValidityTime 300.0
  117.  
  118. # HNA interval in seconds(float)
  119. HnaInterval 10.0
  120.  
  121. # HNA validity time
  122. HnaValidityTime 300.0
  123.  
  124. # When multiple links exist between hosts
  125. # the weight of interface is used to determine
  126. # the link to use. Normally the weight is
  127. # automatically calculated by olsrd based
  128. # on the characteristics of the interface,
  129. # but here you can specify a fixed value.
  130. # Olsrd will choose links with the lowest value.
  131.  
  132. # Weight 0
  133.  
  134.  
  135. # If a certain route should be preferred
  136. # or ignored by the mesh, the Link Quality
  137. # value of a node can be multiplied with a factor
  138. # entered here. In the example the route
  139. # using 192.168.0.1 would rather be ignored.
  140. # A multiplier of 0.5 will result in a small
  141. # (bad) LinkQuality value and a high (bad)
  142. # ETX value.
  143.  
  144. # LinkQualityMult 192.168.0.1 0.5
  145.  
  146. # This multiplier applies to all other nodes
  147. # LinkQualityMult default 0.8
  148.  
  149.  
  150.  
  151. }
  152.  
  153. # Fisheye mechanism for TC messages 0=off, 1=on
  154.  
  155. LinkQualityFishEye 1
  156.  
  157.  
  158. # ignore topology information from nodes further than 3 hops away
  159. #
  160. # update topology information every 3.0 seconds
  161. # (on slower embedded hardware with more than 100 nodes use something like 9 sec)
  162. #
  163. #LinkQualityDijkstraLimit 3 3.0
  164.  
  165. # IP version to use (4 or 6)
  166.  
  167. IpVersion 4
  168.  
  169. # Clear the screen each time the internal state changes
  170.  
  171. ClearScreen yes
  172.  
  173. # HNA IPv4 routes
  174. # syntax: netaddr netmask
  175. # Example Internet gateway:
  176. # 0.0.0.0 0.0.0.0
  177.  
  178. Hna4
  179. {
  180. # Internet gateway:
  181. 0.0.0.0 0.0.0.0
  182. # more entries can be added:
  183. # 10.0.2.15 255.255.255.0
  184. }
  185.  
  186. # HNA IPv6 routes
  187. # syntax: netaddr prefix
  188. # Example Internet gateway:
  189. Hna6
  190. {
  191. # Internet gateway:
  192. # :: 0
  193. # more entries can be added:
  194. # fec0:2200:106:: 48
  195. }
  196.  
  197.  
  198. # Should olsrd keep on running even if there are
  199. # no interfaces available? This is a good idea
  200. # for a PCMCIA/USB hotswap environment.
  201. # "yes" OR "no"
  202.  
  203. AllowNoInt yes
  204.  
  205. # TOS(type of service) value for
  206. # the IP header of control traffic.
  207. # If not set it will default to 16
  208.  
  209. #TosValue 16
  210.  
  211. # The fixed willingness to use(0-7)
  212. # If not set willingness will be calculated
  213. # dynamically based on battery/power status
  214. # if such information is available
  215.  
  216. Willingness 3
  217.  
  218. # Allow processes like the GUI front-end
  219. # to connect to the daemon.
  220.  
  221. IpcConnect
  222. {
  223. # Determines how many simultaneously
  224. # IPC connections that will be allowed
  225. # Setting this to 0 disables IPC
  226.  
  227. MaxConnections 2
  228.  
  229. # By default only 127.0.0.1 is allowed
  230. # to connect. Here allowed hosts can
  231. # be added
  232.  
  233. Host 127.0.0.1
  234. #Host 10.0.0.5
  235.  
  236. # You can also specify entire net-ranges
  237. # that are allowed to connect. Multiple
  238. # entries are allowed
  239.  
  240. #Net 192.168.1.0 255.255.255.0
  241. }
  242.  
  243. # Wether to use hysteresis or not
  244. # Hysteresis adds more robustness to the
  245. # link sensing but delays neighbor registration.
  246. # Used by default. 'yes' or 'no'
  247. # Do not use hysteresis with ETX!
  248.  
  249. UseHysteresis yes
  250.  
  251. # Hysteresis parameters
  252. # Do not alter these unless you know
  253. # what you are doing!
  254. # Set to auto by default. Allowed
  255. # values are floating point values
  256. # in the interval 0,1
  257. # THR_LOW must always be lower than
  258. # THR_HIGH.
  259.  
  260. HystScaling 0.50
  261. HystThrHigh 0.80
  262. HystThrLow 0.30
  263.  
  264.  
  265. # Link quality level
  266. # 0 = do not use link quality
  267. # 1 = use link quality for MPR selection
  268. # 2 = use link quality for MPR selection and routing
  269. # Defaults to 0
  270.  
  271. LinkQualityLevel 0
  272.  
  273. # Link quality window size
  274. # Defaults to 10
  275.  
  276. #LinkQualityWinSize 100
  277.  
  278. # Polling rate in seconds(float).
  279. # Default value 0.05 sec
  280.  
  281. #Pollrate 0.1
  282.  
  283.  
  284. # TC redundancy
  285. # Specifies how much neighbor info should
  286. # be sent in TC messages
  287. # Possible values are:
  288. # 0 - only send MPR selectors
  289. # 1 - send MPR selectors and MPRs
  290. # 2 - send all neighbors
  291. #
  292. # defaults to 0
  293.  
  294. #TcRedundancy 2
  295.  
  296.  
  297. #
  298. # MPR coverage
  299. # Specifies how many MPRs a node should
  300. # try select to reach every 2 hop neighbor
  301. #
  302. # Can be set to any integer >0
  303. #
  304. # defaults to 1
  305.  
  306. #MprCoverage 5
  307.  
  308.  
  309. # Olsrd plugins to load
  310. # This must be the absolute path to the file
  311. # or the loader will use the following scheme:
  312. # - Try the paths in the LD_LIBRARY_PATH
  313. # environment variable.
  314. # - The list of libraries cached in /etc/ld.so.cache
  315. # - /lib, followed by /usr/lib
  316.  
  317. # Configuration examples for plugins:
  318. # see /usr/share/doc/olsrd-plugins/ for some for documentation
  319.  
  320. #LoadPlugin "olsrd_httpinfo.so.0.1"
  321. #{
  322. # # defaults to 1978
  323. # PlParam "Port" "8080"
  324. # # if you dont set these, the default is to listen only on the loopback device
  325. # #PlParam "Host" "80.23.53.22"
  326. # #PlParam "Net" "10.0.0.0 255.0.0.0"
  327. # #PlParam "Net" "0.0.0.0 0.0.0.0"
  328. #}
  329.  
  330. # useful if your machine has an uplink
  331. #LoadPlugin "olsrd_dyn_gw.so.0.4"
  332. #{
  333. # Here parameters are set to be sent to the
  334. # plugin. Theese are on the form "key" "value".
  335. # Parameters ofcause, differs from plugin to plugin.
  336. # Consult the documentation of your plugin for details.
  337.  
  338. # Example: dyn_gw params
  339.  
  340. # how often to check for Internet connectivity
  341. # defaults to 5 secs
  342. # PlParam "Interval" "40"
  343.  
  344. # if one or more IPv4 addresses are given, do a ping on these in
  345. # descending order to validate that there is not only an entry in
  346. # routing table, but also a real internet connection. If any of
  347. # these addresses could be pinged successfully, the test was
  348. # succesful, i.e. if the ping on the 1st address was successful,the
  349. # 2nd won't be pinged
  350. # PlParam "Ping" "141.1.1.1"
  351. # PlParam "Ping" "194.25.2.129"
  352. #}
  353.  
  354. #LoadPlugin "olsrd_nameservice.so.0.2"
  355. #{
  356. #PlParam "name" "xxx"
  357. #PlParam "a.b.c.d" "xxx-eth"
  358. #PlParam "a.b.c.e" "xxx-bbb"
  359. #PlParam "a.b.c.f" "xxx-olsr"
  360. #PlParam "suffix" ".olsr"
  361. #}
  362.  
  363. #LoadPlugin "olsrd_dot_draw.so.0.3"
  364. #{
  365. # accept connection from IP:
  366. # default 127.0.0.1 (localhost)
  367. #PlParam "accept" "192.168.0.5"
  368. #PlParam "port" "2004"
  369. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement