tcpedit_api.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 _TCPEDIT_API_H_
  20. #define _TCPEDIT_API_H_
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /**
  25. * Selection of the encoder plugin is usually done by tcpedit_post_args()
  26. * so when using the config API you must manually specify it using one of
  27. * the following functions
  28. */
  29. int tcpedit_set_encoder_dltplugin_byid(tcpedit_t *, int);
  30. int tcpedit_set_encoder_dltplugin_byname(tcpedit_t *, const char *);
  31. /**
  32. * setters always return TCPEDIT_OK on success or TCPEDIT_ERROR
  33. * if there is a problem. You can use tcpedit_geterr() to get the reason
  34. * for the failure
  35. */
  36. int tcpedit_set_skip_broadcast(tcpedit_t *, bool);
  37. int tcpedit_set_fixlen(tcpedit_t *, tcpedit_fixlen);
  38. int tcpedit_set_fixcsum(tcpedit_t *, bool);
  39. int tcpedit_set_efcs(tcpedit_t *, bool);
  40. int tcpedit_set_ttl_mode(tcpedit_t *, tcpedit_ttl_mode);
  41. int tcpedit_set_ttl_value(tcpedit_t *, uint8_t);
  42. int tcpedit_set_tos(tcpedit_t *, uint8_t);
  43. int tcpedit_set_tclass(tcpedit_t *, uint8_t);
  44. int tcpedit_set_flowlabel(tcpedit_t *, uint32_t);
  45. int tcpedit_set_seed(tcpedit_t *);
  46. int tcpedit_set_mtu(tcpedit_t *, int);
  47. int tcpedit_set_mtu_truncate(tcpedit_t *, bool);
  48. int tcpedit_set_maxpacket(tcpedit_t *, int);
  49. int tcpedit_set_cidrmap_s2c(tcpedit_t *, char *);
  50. int tcpedit_set_cidrmap_c2s(tcpedit_t *, char *);
  51. int tcpedit_set_srcip_map(tcpedit_t *, char *);
  52. int tcpedit_set_dstip_map(tcpedit_t *, char *);
  53. int tcpedit_set_port_map(tcpedit_t *, char *);
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif