Help with simple stuff

I feel like a complete idiot.

I seem to have problems getting this portion of a simple script to work.

event connection_established(c: connection)

{

local mypair = string_cat(c$id$orig_h,",",c$id$resp_h);

}

I get this error:

fatal error in : Val::CONST_ACCESSOR (addr/string) (10.207.40.41)

What obvious thing am I missing? Logically seems like one should be able to concatenate these together.

Mike

Easy fix at least, use the “cat” function instead. string_cat only accepts strings are parameters, but orig_h and resp_h are addrs. cat accepts any type for it’s arguments.

Good luck on whatever you’re working on. :slight_smile:

  .Seth

> local mypair = string_cat(c$id$orig_h,",",c$id$resp_h);

I generally endup with:

  local mypair = fmt ("%s, %s", c$id$orig_h, c$id$resp_h) ;

Aashish