Skip to content

Add < list > command to query available interfaces#78

Open
jamofer wants to merge 1 commit into
linux-can:masterfrom
jamofer:list-interfaces
Open

Add < list > command to query available interfaces#78
jamofer wants to merge 1 commit into
linux-can:masterfrom
jamofer:list-interfaces

Conversation

@jamofer
Copy link
Copy Markdown

@jamofer jamofer commented Jun 5, 2026

Description

Add < list > command to NO_BUS mode:

client: < list >
server: < interfaces can0 can1 >

Lets clients discover buses without the UDP beacon (routed networks, -n). Purely additive, reuses the -i access list. Docs updated. (closes #77)

Test

With 1 interface

jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ ip -br link show type vcan
vcan0            UNKNOWN        <NOARP,UP,LOWER_UP> 
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ ./build/src/socketcand -i vcan0 -l lo -p 1234 >/dev/null &
[1] 708039
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ nc 127.0.0.1 1234
< hi >< list >
< interfaces vcan0 >< open vcan0 >
< ok >^C

With many interfaces

jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ ip -br link show type vcan
vcan0            UNKNOWN        <NOARP,UP,LOWER_UP> 
vcan1            UNKNOWN        <NOARP,UP,LOWER_UP> 
vcan2            UNKNOWN        <NOARP,UP,LOWER_UP> 
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ ./build/src/socketcand -i vcan0,vcan1,vcan2 -l lo -p 1234 >/dev/null &
[1] 712932
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ nc 127.0.0.1 1234
< hi >< list >  
< interfaces vcan0 vcan1 vcan2 >< open vcan0 >
< ok >^C
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ nc 127.0.0.1 1234
< hi >< open vcan1 >
< ok >^C
jamo@CS-Jamo-Laptop:~/github/socketcand(list-interfaces)$ nc 127.0.0.1 1234
< hi >< open vcan2 >
< ok >^C

@jamofer jamofer changed the title socketcand: add < list > command to query available interfaces Add < list > command to query available interfaces Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: list interfaces command in NO_BUS mode

1 participant