# adding bifs

**URL:** <https://community.zeek.org/t/adding-bifs/631>\
**Category:** Zeek\
**Created:** [November 16, 2004, 6:00pm UTC](https://community.zeek.org/t/adding-bifs/631 "2004-11-16T18:00:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_mcnicholas](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@john\_mcnicholas](https://community.zeek.org/u/john_mcnicholas)\
**Post date:** [November 16, 2004, 6:00pm UTC](https://community.zeek.org/t/adding-bifs/631/1 "2004-11-16T18:00:21Z")

</div>

Hi. Just a couple of questions.

1. What is the proper procedure for having bifs (built-in-functions) added  
to the core of bro? For a prototype I went ahead and added 2 functions  
(listed below) and I was wondering if they could be put into the official  
bro distribution. The changes were very basic but I am more than willing to  
submit source code changes if someone could direct me to some documentation  
on the proper procedures, or even who to send the changes to so they can be  
reviewed and/or approved.

// here are the functions

a. global get\_contents\_file: function(cid: conn\_id, direction: count): file;  
b. global get\_file\_name: function(f: file): string;

2. In short, in the .97 build how do you write to the syslog from a ".bro"  
policy script?

I realize the terminology has changed from the .94 to the .97 baseline for  
the concepts of "log/alert and notice" and unless I'm mistaken the "log"  
function has been removed in .97. I'm not sure if the old (.94) "log"  
function would always, or conditionally write to the system log (syslog),  
but that is what I'd like to do now. If it isn't possible, what do you  
suggest I do? For example, should I add another built-in-function?

Thanks in advance for your help.

john

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:37pm UTC](https://community.zeek.org/t/adding-bifs/631/2 "2022-05-06T15:37:14Z")

</div>


