queue-get-macaddr!

Synopsis

(queue-get-macaddr! queue)

Parameters

  • queue

Description

This procedure retrieves the next available data item from the FIFO queue if it can be interpreted as a MAC address (length == 6). 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

A MAC address or #f.

Example

> (define q (queue-create))
q
> (queue-put! q '11:22:33:44:55:66)
ok
> (queue-get-macaddr! q)
11:22:33:44:55:66
> (queue-put! q "item")
ok
> (queue-get-macaddr! q)
#f
> (queue-length q)
1
> (queue-get! q)
"item"
>