Mel, <br>you should be able to split the string into an array and use the part you want only. <br><br>Ex. <br>local dst_port_proto = c$id$resp_p; <br>local port_pair = split(dst_port_proto, /\//); <br># taking the connection destination port/proto pairing and spliting it into an array with the split occuring on the "/"
<br>local port_num = port_pair[1]; <br>local port_proto = port_pair[2]; <br><br>Jake <br><br><br><br><div><span class="gmail_quote">On 9/18/07, <b class="gmail_sendername"><a href="mailto:mel@hackinthebox.org">mel@hackinthebox.org
</a></b> <<a href="mailto:mel@hackinthebox.org">mel@hackinthebox.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br><br><br>I have: global destinations: set[addr,port];<br><br>The port data type will store port information in the following format:<br><br>443/tcp, 22/tcp, 53/udp, etc.<br><br>However, I'm only interested in the port number, not the protocol. How do
<br>I get the port number only?<br><br>--mel<br><br>_______________________________________________<br>Bro mailing list<br><a href="mailto:bro@bro-ids.org">bro@bro-ids.org</a><br><a href="http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro">
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro</a><br></blockquote></div><br>