sysml / clickos

The Click modular router: fast modular packet processing and analysis
http://www.read.cs.ucla.edu/click/
Other
136 stars 35 forks source link

How to log NAT state on ClickOS #15

Closed doantungbk closed 8 years ago

doantungbk commented 8 years ago

Hi ClickOS team,

Currently, I am focusing on NAT state migration between two virtual machines. I work with MazuNAT on ClickOS. I have some questions and really hope your help. The problem is How I can see what is really happening when a thread accesses on translation table. I mean if I can capture or get some information related packet processing such as which shared variables (in multicore processor) are processing a packet and how I can know where translation table is stored. Actually, I tried to capture actions from IPRewriter function but may be it is not solution.

Could anyone have any suggestion in this case? Thank in advance!

fmanco commented 8 years ago

Hi

There's two things you can use:

  1. Element handlers: some elements expose some variables that you can read/set accordingly to your needs and what the element provides you. Check on the elements if there is already what you need.
  2. Edit the elements directly and either export the results as element handlers, or just print stuff to the console. Unfortunately ClickOS doesn't support block devices so you can't write stuff to files.

Best