<div>Hi Martin! How are you? Here in Madrid very, very hot! we need more swimming pools :)!</div>
<div> </div>
<div>>Do you mean the log messages with class <DBG> or just messages logged<br>>through the debug() function?</div>
<div> </div>
<div>Any of them. The only thing I need is to know what is happening inside the program (for example, if the program is parsing attributes, which attribute is being encoding, or if the program is entering in a determined switch-case, etc) at running time.
</div>
<div> </div>
<div>The log messages with class <DBG> would be perfect because it offers practically all the information I need. But I can't see them. You said that the <DBG> class is used very rarely. Does it mean that they can't be forced to appears in the log file? How can I see them?
</div>
<div> </div>
<div>The debug() function, which I didn't discovered:-), would be also OK, but if I simply use it in attrs.c (the file I am working on), bird returns me a syntaxt error when making. What do I need to include in attrs.c in order to make debug() works? perhaps
birdlib.h, where it is declared? or copy it definition from sysdep/unix/log.c? In sysdep/unix/log.c I have also discovered the log_msg() function. I think it works in a very similar way to the debug() function, but I have the same questions for that.
</div>
<div> </div>
<div>About the BGP_TRACE() function, I was analycing it code, and I realise that the problem when using it in the bgp_encode_attrs() function is that BGP_TRACE() needs that the function from you are calling it, have "sock *sk" as argument, in order to get from sk the struct bgp_proto *p by:
</div>
<div> </div>
<div> struct bgp_conn *conn = sk->data;<br> struct bgp_proto *p = conn->bgp;</div>
<div> </div>
<div>As the bgp_encode_attrs() function doesn't have "sock *sk" as argument, I can't use BGP_TRACE inside it :(. I considered adding this argument to bgp_encode_attrs, and try to work in this way, but I think is more complicated that using the other option I explained above.
<br> </div>
<div>What do you think about that? I feel I'm founding too many problems only whith getting the information messages...</div>
<div> </div>
<div>Thanks a lot Martin.</div>
<div> </div>
<div>Best regards,</div>
<div> </div>
<div>Jorge <<a href="mailto:jorge1981@gmail.com">jorge1981@gmail.com</a>><br> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">2006/8/7, Martin Mares <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mj@ucw.cz" target="_blank">mj@ucw.cz</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi!<br><br>> Yes, that's what I mostly got in my log file. But the <DBG> messages show a<br>> lot of information very intersting for me about the internal procedures of
<br>> BIRD. Is there any way of getting them in my log file? or is it completely<br>> impossible?<br><br>Do you mean the log messages with class <DBG> or just messages logged<br>through the debug() function?<br>
<br>The former should be a part of the log file, the latter can be directed<br>into any file you like by the -D switch.<br><br>> I would like to get messages with values of variables while running, or at<br>> least, messages in the log file to know if the program enters into a certain
<br>> switch-case, and that kind of things. I tried with the BGP_TRACE(D_PACKETS,<br>> "hello") function in attrs.c (the file which i am mostly working on), but it<br>> crash when I execute "make". It seems like if it is not declared, or
<br>> something like that. Can you tell me where is the BGP_TRACE declaration, in<br>> order to undertand it?<br><br>It's defined in proto/bgp/bgp.h.<br><br> Have a nice fortnight<br>--
<br>Martin `MJ' Mares <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mj@ucw.cz" target="_blank">mj@ucw.cz</a>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://atrey.karlin.mff.cuni.cz/~mj/" target="_blank">
http://atrey.karlin.mff.cuni.cz/~mj/</a><br>Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth <br>Noli tangere fila metalica, ne in solum incasa quidem.<br></blockquote></div><br><br clear="all"><br>
-- <br>Un saludo,<br><br>Jorge.