blob: 851e43c5b0f5d1dbf79bb1b0ee63254c920d13c6 [file] [log] [blame]
Alexander Afanasyev5ba90362013-07-15 19:58:38 -07001## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2#
3# Copyright (c) 2011-2013, Regents of the University of California
4# Alexander Afanasyev
5#
6# GNU 3.0 license, See the LICENSE file for more information
7#
8# Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
9#
10
11#
12# Based on PyCCN code, copyrighted and licensed as follows
13#
14# Copyright (c) 2011-2013, Regents of the University of California
15# BSD license, See the COPYING file for more information
16# Written by: Derek Kulinski <takeda@takeda.tk>
17# Jeff Burke <jburke@ucla.edu>
18#
19
20import ndn
21from ndn.impl import ccnb
22
23def ccnb_enumerate(names):
24 out = bytearray()
25
26 for name in names:
27 out += ccnb.dtag(ccnb.DTAG_LINK, name.get_ccnb())
28
29 return ccnb.dtag(ccnb.DTAG_COLLECTION, out)