First, I'd suggest that you install a flow to send all appropriate ARP messages to the controller.
Second, use the packet in event to examine the ARP request. The data that you need is all on the event object (specifically, the "buf" field of the Ofp_msg_event class contains the raw packet data, which you can parse as an ARP request). Third, build an ARP reply based on the request. Send this data using one of the packet sending functions (e.g., send_openflow_packet()). Have you considered writing this as a Python application first? Hope that helps. -- Murphy On Nov 30, 2011, at 12:15 AM, Kimihiko FUKAMI wrote: > Hi,Murphy! > > Thank you for your reply! > > I look at arp.hh source code. But, my question is not addressed. > > I forgot to tell you the code I want to write... > > The code is NAT program. In the NAT, the condition is that arp > reply should be addressed. > > I examined which api to send arp reply by using of Nox(zaku) in > C++, and I get a hint from attached Nox sample code "switch.cc". > The hint is Packet_in_event... > > Then I want to tell you how to get packet data from Packet_in_event > instance. Please give me a hint! > > > Murphy McCauley <jam...@nau.edu> wrote: > >> I don't think I've ever used it, but have you taken a look at >> include/netinet++/arp.hh? >> >> -- Murphy >> >> On Nov 25, 2011, at 1:54 AM, Kimihiko FUKAMI wrote: >> >>> Hi, >>> >>> Currently, I can not send an ARP Reply by using of Nox(zaku) in >>> C++ code. >>> >>> # I can write a code to reply ARP in python. >>> >>> So, I want a code sample to send ARP Reply in C++. >>> >>> Please teach me! >>> >>> --- >>> E-mail: fukami.kimih...@lab.ntt.co.jp >>> >>> _______________________________________________ >>> nox-dev mailing list >>> nox-dev@noxrepo.org >>> http://noxrepo.org/mailman/listinfo/nox-dev > > > --- > 深見 公彦 (Kimihiko FUKAMI) TEL:0422-59-2475 > NTT 情報流通プラットホーム研究所 > ネットワークセキュリティプロジェクト > E-mail: fukami.kimih...@lab.ntt.co.jp > _______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev