import { request } from '@/plugins/http-fetch';

// 网元抓包生成pcap
export function tcpdumpNeTask(
  signal: AbortSignal,
  data: Record<string, string>
) {
  return request({
    url: '/api/rest/traceManagement/v1/tcpdumpNeTask',
    method: 'post',
    data: data,
    signal: signal,
  });
}

// 网元抓包pcap文件下载
export function tcpdumpPcapDownload(data: Record<string, string>) {
  return request({
    url: '/api/rest/traceManagement/v1/tcpdumpPcapDownload',
    method: 'post',
    data: data,
    responseType: 'blob',
  });
}

// 网元抓包生成pcap
export function tcpdumpNeUPFTask(data: Record<string, string>) {
  return request({
    url: '/api/rest/traceManagement/v1/tcpdumpNeUPFTask',
    method: 'post',
    data: data,
  });
}
