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

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

// 网元抓包pcap文件下载
export function tcpdumpPcapDownload(data: Record<string, string>) {
  return request({
    url: '/tcpdump/download',
    method: 'post',
    data: data,
    responseType: 'blob',
    timeout: 180_000,
  });
}

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