XCI GBUdb set format

Set requests are used to change one or more fields of a GBUdb record, or establish a new record if it does not yet exist. There are three fields in a GBUdb record (aside from the IP itself) and they are the type flag (good, bad, ugly, ignore), the good event count, and bad event count. Each of these are represented by an attribute in the <set/> element. At least one of these should be present in a set request for a given IP. Missing attributes in the request will not be changed. The first four examples below show this by changing only the type flag. The final example changes all three fields:

<snf><xci><gbudb><set ip='12.34.56.78' type='good'/></gbudb></xci></snf>
<snf><xci><gbudb><set ip='12.34.56.78' type='bad'/></gbudb></xci></snf>
<snf><xci><gbudb><set ip='12.34.56.78' type='ugly'/></gbudb></xci></snf>
<snf><xci><gbudb><set ip='12.34.56.78' type='ignore'/></gbudb></xci></snf>
<snf><xci><gbudb><set ip='12.34.56.78' type='ugly' b='1' g='0'/></gbudb></xci></snf>

In the final example:

The ip='12.34.56.78' attribute indicates we are setting data values for the IP 12.34.56.78.

The type='ugly' attribute indicates we are setting the type flag to ugly.

The b='1' attribute indicates we are setting the bad event counter to 1.

The g='0' attribute indicates we are setting the good event counter to 0.

Related Topics