queue-get-ipaddr!

Synopsis

(queue-get-ipaddr! queue)

Parameters

  • queue

Description

This procedure retrieves the next available data item from the FIFO queue if it can be interpreted as an IP address (length == 16). If the next element has a different size or if the queue is empty, #f is returned.

Side Effects

The queue may be modified.

Return Value

An IP address or #f.

Example

> (define q (queue-create))
q
> (queue-put! q '10.3.3.3)
ok
> (queue-put! q 'ffff::ffff)
ok
> (queue-get-ipaddr! q)
10.3.3.3
> (queue-get-macaddr! q)
#f
> (queue-get-ipaddr! q)
ffff::ffff
> (queue-get-ipaddr! q)
#f
>