user_api.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* $Id$ */
  2. /*
  3. * Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
  4. * Copyright (c) 2013-2018 Fred Klassen <tcpreplay at appneta dot com> - AppNeta
  5. *
  6. * The Tcpreplay Suite of tools is free software: you can redistribute it
  7. * and/or modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or with the authors permission any later version.
  10. *
  11. * The Tcpreplay Suite is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _DLT_user_API_H_
  20. #define _DLT_user_API_H_
  21. #include "tcpedit_types.h"
  22. #include "plugins_types.h"
  23. #include "user_types.h"
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /**
  28. * \brief User Plugin API functions for creating a user specified DLT/Layer 2 header
  29. *
  30. * setters always return TCPEDIT_OK on success or TCPEDIT_ERROR
  31. * if there is a problem. You can use tcpedit_geterr() to get the reason
  32. * for the failure
  33. */
  34. int tcpedit_user_set_dlt_type(tcpedit_t *tcpedit, u_int16_t type);
  35. int tcpedit_user_set_dlink(tcpedit_t *tcpedit, u_char *data, int datalen, tcpedit_user_dlt_direction direction);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif