#!/bin/bash | |
workdir=$1 | |
c_ipaddr=$2 | |
sudo nfd &> $workdir/logs/nfd.log & | |
sleep 3 | |
nrd &> $workdir/logs/nrd.log & | |
sleep 3 | |
faceid=$(nfdc create udp4://$c_ipaddr | grep -Po 'FaceId: .*?,' | sed 's/FaceId: //' | sed 's/,//') | |
nfdc add-nexthop ndn:/localhop $faceid |