在linux下播放组播流出现setsockopt:No such device错误是因为多播IP没有add路由表里面

可以采用如下命令完成:

root@android:/ # busybox route add -net 239.1.1.0 netmask 239.1.1.0 dev eth0
busybox route add -net 239.1.1.0 netmask 239.1.1.0 dev eth0
route: bogus netmask 239.1.1.0
1|root@android:/ # busybox route add default gw "192.168.1.198" dev eth0
busybox route add default gw "192.168.1.198" dev eth0
root@android:/ #

完整的命令如下:

C:\Users\Administrator>adb shell
adb server is out of date.  killing...
* daemon started successfully *
root@android:/ # busybox ifconfig eth0 192.168.1.198
busybox ifconfig eth0 192.168.1.198
root@android:/ # busybox ifconfig eth0
busybox ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 1E:ED:19:27:1A:B3
          inet addr:192.168.1.198  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1ced:19ff:fe27:1ab3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:133 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13782 (13.4 KiB)  TX bytes:3615 (3.5 KiB)

root@android:/ # busybox netsh int ipv6 show interface
busybox netsh int ipv6 show interface
netsh: applet not found
1|root@android:/ # busybox route
busybox route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
root@android:/ # busybox route add 239.1.1.0 mask 255.255.255.0 192.168.1.198 -p
k 255.255.255.0 192.168.1.198 -p                                              <
route: invalid option -- 'p'
BusyBox v1.15.3 (2011-11-25 17:55:55 CST) multi-call binary

Usage: route [{add|del|delete}]

Edit kernel routing tables

Options:
        -n      Don't resolve names
        -e      Display other/more information
        -A inet{6}      Select address family

1|root@android:/ # busybox route add 239.1.1.0 mask 255.255.255.0 192.168.1.198
sk 255.255.255.0 192.168.1.198                                                <
BusyBox v1.15.3 (2011-11-25 17:55:55 CST) multi-call binary

Usage: route [{add|del|delete}]

Edit kernel routing tables

Options:
        -n      Don't resolve names
        -e      Display other/more information
        -A inet{6}      Select address family

1|root@android:/ # route add -net 224.0.0.0 netmask 224.0.0.0 eth0
route add -net 224.0.0.0 netmask 224.0.0.0 eth0
Invalid argument
22|root@android:/ # route add -net 239.1.1.0 netmask 239.1.1.0 eth0
route add -net 239.1.1.0 netmask 239.1.1.0 eth0
Invalid argument
22|root@android:/ # busybox route add -net 239.1.1.0 netmask 239.1.1.0 eth0
busybox route add -net 239.1.1.0 netmask 239.1.1.0 eth0
route: bogus netmask 239.1.1.0
1|root@android:/ # netstat -ng
netstat -ng
Proto Recv-Q Send-Q Local Address          Foreign Address        State
 tcp       0      0 127.0.0.1:5037         0.0.0.0:*              LISTEN
 tcp       0      0 127.0.0.1:46036        127.0.0.1:14089        ESTABLISHED
tcp6       0      0 :::14087               :::*                   LISTEN
tcp6       0      0 :::14088               :::*                   LISTEN
tcp6       0      0 :::14089               :::*                   LISTEN
tcp6       0      0 :::14092               :::*                   LISTEN
tcp6       0      4 ::ffff:127.0.0.1:14089 ::ffff:127.0.0.1:46036 ESTABLISHED
tcp6       0      0 ::ffff:127.0.0.1:14088 ::ffff:127.0.0.1:39454 TIME_WAIT
root@android:/ # ifconfig
ifconfig
root@android:/ # busybox ifconfig
busybox ifconfig
eth0      Link encap:Ethernet  HWaddr 1E:ED:19:27:1A:B3
          inet addr:192.168.1.198  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1ced:19ff:fe27:1ab3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:358850 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:488018720 (465.4 MiB)  TX bytes:6367 (6.2 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5330 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5330 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:352540 (344.2 KiB)  TX bytes:352540 (344.2 KiB)

root@android:/ # busybox route add -net 239.1.1.0 netmask 239.1.1.0 dev eth0
busybox route add -net 239.1.1.0 netmask 239.1.1.0 dev eth0
route: bogus netmask 239.1.1.0
1|root@android:/ # busybox route add default gw "192.168.1.198" dev eth0
busybox route add default gw "192.168.1.198" dev eth0
root@android:/ #

linux下播放组播流出现setsockopt:No such device错误的更多相关文章

  1. 使用VLC创建组播流

    vlc既是一个播放器,又可以成为一个流媒体服务器.最近需要做udp组播播放相关的东西,需要先在本地搭建一个udp组播服务器,因为机器上本来就装有vlc,所以就用它了. 第一步: 点击媒体->流 ...

  2. Linux网络编程组播测试代码

    Linux网络编程组播测试代码 (转载)   组播客户端代码如下: #include <sys/types.h>#include <sys/socket.h>#include ...

  3. ffmpeg无法接收组播流问题处理

    问题:ffmpeg无法对IP组播进行处理,表现如下 [root@os01 /]# ffprobe udp://225.0.0.2:9000 ffprobe version Copyright (c) ...

  4. linux 广播和组播

    广播和组播 广播,必须使用UDP协议,是只能在局域网内使用,指定接收端的IP为*.*.*.255后,发送的信息,局域网内的所有接受端就能够接到信息了. 广播的发送端代码 #include <st ...

  5. linux下cp覆盖原so文件时引起的段错误原因确定

    原创作品,转载请注明出处http://www.cnblogs.com/leo0000/p/5694416.html 最近因为一个很有意思的段错误学习了一些新的东西. 当时现象是这样的,程序正在运行,系 ...

  6. linux下使用gcc/g++编译代码时gets函数有错误

    今天在linux中使用个g++编译一个名为myfirst.cpp的代码的时候,出现如下错误 myfirst.cpp: In function ‘int main()’:myfirst.cpp:11:2 ...

  7. linux下播放器设计和开发

    http://blog.csdn.net/henryjee/article/details/6737392 本文根据DawnLightPlayer的开发经验写成.DawnLithtPlayer是今天3 ...

  8. Linux下用户-组权限配置

    cat /etc/group cat /etc/ashadow 一.用户管理 1.添加用户 #useradd 用户名 useradd php100;用cat /etc/passwd查看 分析:php1 ...

  9. Linux下rm -rf删除文件夹报错_ Device or resource busy

    1.错误信息 rm: cannot remove `speechd-centos_6.2-prtl-pred-mf34/modules/t2p/py/third/g2p/.nfs00000000039 ...

随机推荐

  1. Android广播的发送与接收

    Android广播的发送与接收 效果图 广播发送 广播分为有序广播和无序广播 有序广播与无序广播的区别 无序广播:只要是广播接收者指定了接收的事件类型,就可以接收到发送出来的广播消息.不能修改消息. ...

  2. python用openpyxl操作excel

    python操作excel方法 1)自身有Win32 COM操作office但讲不清楚,可能不支持夸平台,linux是否能用不清楚,其他有专业处理模块,如下 2)xlrd:(读excel)表,xlrd ...

  3. springMVC源码分析--异常处理机制HandlerExceptionResolver简单示例(一)

    springMVC对Controller执行过程中出现的异常提供了统一的处理机制,其实这种处理机制也简单,只要抛出的异常在DispatcherServlet中都会进行捕获,这样就可以统一的对异常进行处 ...

  4. [Mysql]mysql windows下配置文件

    环境是win7 mysql5.6版本 测试下配置文件是否可用(之前没用过windows下的msyql配置) 修改配置前查询下: mysql> show variables like '%max_ ...

  5. wget 常用参数释义

    wget 大法好啊,废话不多说,下面开始wget之旅吧. 下载限速 wget命令有一个内建的选项可以先顶下载任务占有的最大的带宽,从而保证其他应用程序的流畅运行. 具体使用--limit-rate 数 ...

  6. 【NPR】非真实感渲染实验室

    写在前面 前几天在知乎看到一个问题--关于非实感图形学或者风格化渲染有哪些好的书或者paper,我刚好接触过一些就去里面回答了一下.答完以后突然想在Unity里搞一个这样的集锦,把一些简单的NPR论文 ...

  7. 开源项目——小Q聊天机器人V1.2

    小Q聊天机器人V1.0 http://blog.csdn.net/baiyuliang2013/article/details/51386281 小Q聊天机器人V1.1 http://blog.csd ...

  8. iOS 南京互联网大会分享及个人见解 韩俊强的博客

    首先分两大块: 1.如何打造高效/稳定的App (重点): 2.软件自动化测试: 每日更新关注:http://weibo.com/hanjunqiang  新浪微博! 每日更新关注:http://we ...

  9. Hadoop:Hadoop基本命令

    http://blog.csdn.net/pipisorry/article/details/51223877 常用命令 启用hadoop start-dfs.sh start-hbase.sh 停止 ...

  10. FND Debug Log(FND_LOG_MESSAGES)

    之前每个模块记录日志的方式都不同,都会把日志写到不同的文件中,对于User来说很麻烦,需要记住很多的配置,现在越来越多的模块使用FND Logging来存储日志,比如WIP,RCV,OAF...FND ...