openflow.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2013 The TCPDUMP project
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  15. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  16. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  17. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  18. * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  19. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  20. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  22. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  23. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  24. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  25. * POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. /* OpenFlow: protocol between controller and datapath. */
  28. /* for netdissect_options */
  29. #include "netdissect.h"
  30. #define OF_HEADER_LEN 8
  31. #define ONF_EXP_ONF 0x4f4e4600
  32. #define ONF_EXP_BUTE 0xff000001
  33. #define ONF_EXP_NOVIFLOW 0xff000002
  34. #define ONF_EXP_L3 0xff000003
  35. #define ONF_EXP_L4L7 0xff000004
  36. #define ONF_EXP_WMOB 0xff000005
  37. #define ONF_EXP_FABS 0xff000006
  38. #define ONF_EXP_OTRANS 0xff000007
  39. extern const struct tok onf_exp_str[];
  40. /*
  41. * Routines to print packets for various versions of OpenFlow.
  42. */
  43. extern const u_char *of10_header_body_print(netdissect_options *ndo,
  44. const u_char *, const u_char *,
  45. const uint8_t, const uint16_t, const uint32_t);
  46. extern const char * of_vendor_name(const uint32_t);