-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
365 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: iOS | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ios: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: lint | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: MinGW-w64 Test | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
MinGW-w64-build: | ||
|
@@ -32,7 +38,7 @@ jobs: | |
with: | ||
path: baresip-win32/re | ||
|
||
- uses: actions/cache@v2 | ||
- uses: actions/cache@v4 | ||
id: openssl | ||
with: | ||
path: baresip-win32/openssl | ||
|
@@ -50,7 +56,7 @@ jobs: | |
run: | | ||
cd baresip-win32 && make retest | ||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: retest-exe | ||
path: baresip-win32/re/build/test/retest.exe | ||
|
@@ -62,7 +68,7 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v2 | ||
- uses: actions/download-artifact@v4 | ||
- uses: sreimers/[email protected] | ||
with: | ||
name: re | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_job: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <re_types.h> | ||
#include <re_fmt.h> | ||
#include <re_mbuf.h> | ||
#include <re_trace.h> | ||
#include <re_mem.h> | ||
|
||
|
||
int re_text2pcap(struct re_printf *pf, struct re_text2pcap *pcap) | ||
{ | ||
if (!pcap) | ||
return EINVAL; | ||
|
||
uint8_t *buf = mbuf_buf(pcap->mb); | ||
if (!buf) | ||
return EINVAL; | ||
|
||
re_hprintf(pf, "%s %H 000000", pcap->in ? "I" : "O", fmt_timestamp_us, | ||
NULL); | ||
|
||
size_t sz = mbuf_get_left(pcap->mb); | ||
for (size_t i = 0; i < sz; i++) { | ||
re_hprintf(pf, " %02x", buf[i]); | ||
} | ||
|
||
re_hprintf(pf, " %s", pcap->id); | ||
|
||
return 0; | ||
} | ||
|
||
|
||
void re_text2pcap_trace(const char *name, const char *id, bool in, | ||
const struct mbuf *mb) | ||
{ | ||
struct re_text2pcap pcap = {.in = in, .mb = mb, .id = id}; | ||
size_t pcap_buf_sz = (mbuf_get_left(mb) * 3) + 64; | ||
|
||
char *pcap_buf = mem_alloc(pcap_buf_sz, NULL); | ||
if (!pcap_buf) | ||
return; | ||
|
||
re_snprintf(pcap_buf, pcap_buf_sz, "%H", re_text2pcap, &pcap); | ||
|
||
re_trace_event("pcap", name, 'I', NULL, RE_TRACE_ARG_STRING_COPY, | ||
"pcap", pcap_buf); | ||
|
||
mem_deref(pcap_buf); | ||
} |
Oops, something went wrong.