在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. Dynamics CRM REST Builder

    今天介绍个很棒的工具叫CRM REST Builder,不管是2016之前的odata查询或者现在的web api都不在话下,界面如下,选项非常丰富 这里以retrieve multiple举个例子, ...

  2. Linux内核中的有关Page的算法

    static inline int get_order(unsigned long size) { int order; size = (size-1) >> (PAGE_SHIFT-1) ...

  3. 1、win10下连接本地系统上的Linux操作系统(分别以Nat方式和桥接模式实现)

    1.win10下连接本地系统上的Linux操作系统(分别以Nat方式和桥接模式实现) 一.准备知识:win10下打开Administrator的方式 在win10操作系统中,Administrator ...

  4. Linux 高性能服务器编程——TCP/IP协议族

    1 TCP/IP协议族体系结构 数据链路层:     职责:实现网卡接口的网络驱动程序,一处理数据在物理媒介(如以太网.令牌环等)上的传输.     常用协议:ARP协议(地址解析协议),RARP协议 ...

  5. 如何将Provisioning Profile安装到开发的Mac系统上

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 免责申明:本博客提供的所有翻译文章原稿均来自互联网,仅供学习交 ...

  6. 福利:工作经常用到的Mac软件整理(全)

    每日更新关注:http://weibo.com/hanjunqiang  新浪微博!iOS开发者交流QQ群: 446310206 前言 这是我个人在工作中会用到的Mac软件,其中包括办公.开发.视频等 ...

  7. 安卓自定义View实现图片上传进度显示(仿QQ)

    首先看下我们想要实现的效果如下图(qq聊天中发送图片时的效果): 再看下图我们实现的效果: 实现原理很简单,首先我们上传图片时需要一个进度值progress,这个不管是自己写的上传的方法还是使用第三方 ...

  8. 18 Ui美化 剪切动画clip

    输入0 - 10000 让图片根据数值显示部分图片 在工程文件的res/drawable/新建clip文件 <?xml version="1.0" encoding=&quo ...

  9. EBS接口表关系概览(部分)

    ItemTable Relationship TransactionTable Relationship PO/PRTable Relationships ReceivingTable Relatio ...

  10. iOS9 中关闭ATS的方法

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) iOS9中增加了系统的安全性,你会发现默认情况下打开非http ...