<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; ranabrijendra12</title>
	<atom:link href="https://www.emblogic.com/blog/author/ranabrijendra12/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>article on security ..linux vs windows</title>
		<link>https://www.emblogic.com/blog/12/article-on-security-linux-vs-windows/</link>
		<comments>https://www.emblogic.com/blog/12/article-on-security-linux-vs-windows/#comments</comments>
		<pubDate>Fri, 20 Dec 2013 08:01:08 +0000</pubDate>
		<dc:creator><![CDATA[ranabrijendra12]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7758</guid>
		<description><![CDATA[Why Linux Is More Secure Than Windows Article posted by&#8212;&#8212;Rana Brijendra singh &#8220;Security through obscurity&#8221; may be a catchy phrase, but it&#8217;s not the only thing that&#8217;s catching among Windows users. The expression is intended to suggest that proprietary software &#8230; <a href="https://www.emblogic.com/blog/12/article-on-security-linux-vs-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Why Linux Is More Secure Than Windows<br />
Article posted by&#8212;&#8212;Rana Brijendra singh</p>
<p>&#8220;Security through obscurity&#8221; may be a catchy phrase, but it&#8217;s not the only thing that&#8217;s catching among Windows users.<br />
The expression is intended to suggest that proprietary software is more secure by virtue of its closed nature. If hackers can&#8217;t see the code, then it&#8217;s harder for them to create exploits for it&#8211;or so the thinking goes.<br />
Unfortunately for Windows users, that&#8217;s just not true&#8211;as evidenced by the never-ending parade of patches coming out of Redmond. In fact, one of Linux&#8217;s many advantages over Windows is that it is more secure&#8211;much more. For small businesses and other organizations without a dedicated staff of security experts, that benefit can be particularly critical.<br />
Five key factors underlie Linux&#8217;s superior security:<br />
1. Privileges<br />
Linux systems are by no means infallible, but one of their key advantages lies in the way account privileges are assigned. In Windows, users are generally given administrator access by default, which means they pretty much have access to everything on the system, even its most crucial parts. So, then, do viruses. It&#8217;s like giving terrorists high-level government positions.<br />
With Linux, on the other hand, users do not usually have such &#8220;root&#8221; privileges; rather, they&#8217;re typically given lower-level accounts. What that means is that even if a Linux system is compromised, the virus won&#8217;t have the root access it would need to do damage systemwide; more likely, just the user&#8217;s local files and programs would be affected. That can make the difference between a minor annoyance and a major catastrophe in any business setting.<br />
Social Engineering<br />
Viruses and worms often spread by convincing computer users to do something they shouldn&#8217;t, like open attachments that carry viruses and worms. This is called social engineering, and it&#8217;s all too easy on Windows systems. Just send out an e-mail with a malicious attachment and a subject line like, &#8220;Check out these adorable puppies!&#8221;&#8211;or the porn equivalent&#8211;and some proportion of users is bound to click without thinking. The result? An open door for the attached malware, with potentially disastrous consequences organizationwide.<br />
Thanks to the fact that most Linux users don&#8217;t have root access, however, it&#8217;s much harder to accomplish any real damage on a Linux system by getting them to do something foolish. Before any real damage could occur, a Linux user would have to read the e-mail, save the attachment, give it executable permissions and then run the executable. Not very likely, in other words.<br />
3. The Monoculture Effect<br />
However you want to argue the exact numbers, there&#8217;s no doubt that Microsoft Windows still dominates most of the computing world. In the realm of e-mail, so too do Outlook and Outlook Express. And therein lies a problem: It&#8217;s essentially a monoculture, which is no better in technology than it is in the natural world. Just as genetic diversity is a good thing in the natural world because it minimizes the deleterious effects of a deadly virus, so a diversity of computing environments helps protect users.<br />
Fortunately, a diversity of environments is yet another benefit that Linux offers. There&#8217;sUbuntu, there&#8217;s Debian, there&#8217;s fedora and there are many other distributions. There are also many shells, many packaging systems, and many mail clients; Linux even runs on many architectures beyond just Intel. So, whereas a virus can be targeted squarely at Windows users, since they all use pretty much the same technology, reaching more than a small faction of Linux users is much more difficult. Who wouldn&#8217;t want to give their company that extra layer of assurance?<br />
4-Audience Size<br />
Hand-in-hand with this monoculture effect comes the not particularly surprising fact that the majority of viruses target Windows, and the desktops in your organization are no exception. Millions of people all using the same software make an attractive target formalicious attacks.<br />
5. How Many Eyeballs<br />
&#8220;Linus&#8217; Law&#8221;&#8211;named for Linus Torvalds, the creator of Linux&#8211;holds that, &#8220;given enough eyeballs, all bugs are shallow.&#8221; What that means is that the larger the group of developers and testers working on a set of code, the more likely any flaws will be caught and fixed quickly. This, in other words, is essentially the polar opposite of the &#8220;security through obscurity&#8221; argument.<br />
With Windows, it&#8217;s a limited set of paid developers who are trying to find problems in the code. They adhere to their own set timetables, and they don&#8217;t generally tell anyone about the problems until they&#8217;ve already created a solution, leaving the door open to exploits until that happens. Not a very comforting thought for the businesses that depend on that technology.<br />
In the Linux world, on the other hand, countless users can see the code at any time, making it more likely that someone will find a flaw sooner rather than later. Not only that, but users can even fix problems themselves. Microsoft may tout its large team of paid developers, but it&#8217;s unlikely that team can compare with a global base of Linux user-developers around the globe. Security can only benefit through all those extra &#8220;eyeballs.&#8221;<br />
Once again, none of this is to say that Linux is impervious; no operating system is. And there are definitely steps Linux users should take to make their systems as secure as possible, such as enabling a firewall, minimizing the use of root privileges, and keeping the system up to date. For extra peace of mind there are also virus scanners available for Linux, including ClamAV. These are particularly good measures for small businesses, which likely have more at stake than individual users do.<br />
It&#8217;s also worth noting that security firm Secunia recently declared that Apple products have more security vulnerabilities than any others&#8211;including Microsoft&#8217;s.<br />
Either way, however, when it comes to security, there&#8217;s no doubt that Linux users have a lot less to worry about.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/article-on-security-linux-vs-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>article on socket programming</title>
		<link>https://www.emblogic.com/blog/12/article-on-socket-programming/</link>
		<comments>https://www.emblogic.com/blog/12/article-on-socket-programming/#comments</comments>
		<pubDate>Thu, 05 Dec 2013 11:41:19 +0000</pubDate>
		<dc:creator><![CDATA[ranabrijendra12]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7641</guid>
		<description><![CDATA[ARTICLE ON SOCKET PROGRAMMING [LINUX] A LINUX socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes WHICH allow one process to communicate with another whether it is local on the same computer system or remote &#8230; <a href="https://www.emblogic.com/blog/12/article-on-socket-programming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>ARTICLE ON SOCKET PROGRAMMING [LINUX]</p>
<p>A LINUX socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes WHICH allow one process to communicate with another whether it is local on the same computer system or remote over the network. Many other higher level protocols are built upon sockets technology.<br />
Sockets utilize the following standard protocols:</p>
<p>Protocol Description<br />
IP Internet Protocol provides network routing using IP addressing eg 192.168.1.204<br />
UDP User Datagram Protocol &#8211; IP with ports to distinguish among processes running on same host. No data verification.<br />
TCP Transmission Control Protocol &#8211; IP with ports to distinguish among processes running on same host.Connection oriented, stream<br />
transfer, full duplex, reliable with data verification.</p>
<p>Typically one configures a socket server to which a socket client may attach and communicate.<br />
Create the socket instance.<br />
IN THIS THE STEPS ARE DESCRIBED HOW WE CREATE SOCKET &amp; HOW SERVER AND CLINT INTERACT WITH EACH OTHER.<br />
1-Socket function prototype:<br />
int sockfd = socket(int socket_family, int socket_type, int protocol)<br />
discription: Choose socket communications family/domain<br />
according to the communication within same host or over the network we choose the family as AF_UNIX,OR AF_INET ACCORDINGLY.</p>
<p>Choose socket type:</p>
<p>TCP: SOCK_STREAM for connection oriented services using tcp protocol.<br />
UDP: SOCK_DGRAM for connectionless services using UDP protocol.</p>
<p>Choose socket protocol: (See /etc/protocols)<br />
for AF_UNIX &amp; AF_INET or Internet Protocol (IP): 0 or IPPROTO_IP<br />
for ICMP: 1<br />
2-Configure the socket as a client or server:<br />
Socket Server            Socket Client<br />
socket()                      socket()<br />
bind()<br />
listen()<br />
accept()                        connect()<br />
recv()/send()            recv()/send()<br />
close() close()<br />
This is specific to whether the application is a socket client or a socket server.<br />
above all calls are listed which we use in socket as server &amp; clint configuration.<br />
the detail discription of calls are as&#8230;<br />
Socket server:<br />
bind(): bind the socket to a local socket address. This assigns a name to the socket.Function prototype:<br />
int bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);<br />
Bind arguments:<br />
int sockfd: Socket file descriptor. Returned by call to &#8220;socket&#8221;.<br />
struct sockaddr: Socket information structure<br />
socklen_t addrlen: Size of structure<br />
Returns 0: Sucess, -1: Failure and errno may be set.<br />
listen(): listen for connections on a socket created with &#8220;socket()&#8221; and &#8220;bind()&#8221; and accept incoming connections. This is used for TCP and not UDP. Zero is returned on success.Function prototype:<br />
int listen(int s, int backlog);<br />
Listen arguments:<br />
int s: Socket file descriptor. Returned by call to &#8220;socket&#8221;. Identifies a bound but unconnected socket.<br />
int backlog: Set maximum length of the queue of pending connections for the listening socket. A reasonable value is 10. Actual maximum permissible: SOMAXCONN .<br />
accept(): accept a connection on a socket. Accept the first connection request on the queue of pending connections, create a new connected socket with mostly the same properties as defined by the call to &#8220;socket()&#8221;, and allocate a new file descriptor for the socket, which is returned. The newly created socket is no longer in the listening state. Note this call blocks until a client connects.<br />
Function prototype:<br />
int accept(int s, struct sockaddr *addr, socklen_t *addrlen);<br />
Accept arguments:<br />
int s: Socket file descriptor. Returned by call to &#8220;socket&#8221;.<br />
struct sockaddr *addr: Pointer to a sockaddr structure. This structure is filled in with the address of the connecting entity.<br />
socklen_t *addrlen: initially contains the size of the structure pointed to by addr; on return it will contain the actual length (in bytes) of the address returned. When addr is NULL nothing is filled in.<br />
Returns:<br />
Success: non-negative integer, which is a descriptor of the accepted socket. Argument &#8220;addrlen&#8221; will have a return value.<br />
Fail: -1, errno may be set</p>
<p>Socket client:<br />
connect(): initiate a connection with a remote entity on a socket. Zero is returned on success. Support both TCP (SOCK_STREAM) and UDP (SOCK_DGRAM). For SOCK_STREAM, an actual connection is made. For SOCK_DGRAM the address is the address to which datagrams are sent and received.<br />
Connect function prototype:<br />
int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);<br />
Connect arguments: (Same as server&#8217;s bind() arguments)<br />
int sockfd: Socket file descriptor. Returned by call to &#8220;socket&#8221;.<br />
struct sockaddr: Socket information structure<br />
socklen_t addrlen: Size of structure<br />
Returns 0: Sucess, -1: Failure and errno may be set.<br />
Zero is returned upon success and on error, -1 and errno is set appropriately.</p>
<p>here description of sockaddr_in data structure that how we name &amp; provide address to socket.</p>
<p>socketInfo.sin_family = AF_INET;<br />
// Use any address available to the system. This is a typical configuration for a server.<br />
// Note that this is where the socket client and socket server differ.<br />
// A socket client will specify the server address to connect to.<br />
socketInfo.sin_addr.s_addr = htonl(&#8220;ip addd&#8221;); // Translate long integer to network byte order.<br />
socketInfo.sin_port = htons(portNumber); // Set port number</p>
<p>so this is all about socket programming in brief&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/article-on-socket-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RANA BRIJENDRA  SINGH</title>
		<link>https://www.emblogic.com/blog/07/rana-brijendra-singh/</link>
		<comments>https://www.emblogic.com/blog/07/rana-brijendra-singh/#comments</comments>
		<pubDate>Mon, 22 Jul 2013 03:52:36 +0000</pubDate>
		<dc:creator><![CDATA[ranabrijendra12]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mr.Pravjot Singh]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=6923</guid>
		<description><![CDATA[                                                                           SUBMITTED TO:  Mr. &#8230; <a href="https://www.emblogic.com/blog/07/rana-brijendra-singh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div>
<p>                                                                           SUBMITTED TO:  Mr. PRAVJOT SINGH                                  <span style="text-decoration: underline">LINUX DEVICE DRIVERS  </span></p>
</div>
<p>v  <strong>ARTICLE ON CHARACTER DRIVER:</strong></p>
<p>THIS  ARTICLE   IS ALL ABOUT  TO  THE CONCEPTS  THAT  I HAVE  LEARNED  AND  MAINLY  CONCERNED TO THE WORK  WHATEVER  I HAVE PERFORMED  IN THE PROJECT  REGARDING ASSIGNMENT IN ORDER  TO  SUCCESSFUL  COMPLETION OF TRAINING.</p>
<p>v  <strong>INTRODUCTION OF CHARACTER DRIVER:</strong></p>
<p>AS THE  NAME  SUGGESTS  ,THE DEVICE -DRIVER  PROVIDES THE MECHANISM  TO  DRIVE THE  HARDWARE(DEVICE)  ACCORDING  TO  THE  APPLICTION.THE TYPE &amp; CATEGORY   OF THE DRIVER  IS DEPENDENT  ON  THE  TYPE &amp;  REQUIREMENT OF APPLICATION  WHICH  WEAREUSING. WHICH MEANS TOSAYTHAT  TO ACCESS  THE  PENDRIVE WE NEED USB  DRIVER  ,FOR BTLUETOOTH WE WE NEED BT DRIVER &amp; FOR  MEDIA  PLAYER  WE  NEED  A  SEPRATE ONE.  DIFFERENT TYPES OF APPLICATION  REQUIRES   DIFFERENT  TYPE  OF  DRIVERS.</p>
<p>CHARACTER DRIVER WORKS FOR CHARACTER DEVICES   WHICH  CAN BE ACCESSED AS STREAM OF BYTES. SUCH DRIVER USUALLY IMPLEMENTS OPEN, WRITE,  READ  &amp;  CLOSE  SYSTEM  CALLS.</p>
<p>I think One of the good features of Linux is the ability to extend at runtime the set of features offered by the kernel. This means that you can add modules to the kernel (and remove modules as well) while the system is up and running. The need of using device drivers is to increase the functionality of kernel . Each piece of code that can be added to the kernel at runtime is called a module. Each module is made up of piece of codes that can be dynamically linked to the running kernel by the insmod program and can be unlinked by the rmmod program.</p>
<p>Currently I am working on character driver &amp; its practical implementation. In this article I am going to discuss what i know about character driver briefly.</p>
<p>Now as I have to make my driver capable of directly handshake-able with the kernel so it was essential to work in kernel space instead of user space ,so i have to use the kernel libraries(like kernel.h, init.h ,fs.h etc..) instead of glibc libraries(like stdio.h,stdlib.h,fcntl.h etc&#8230;).</p>
<p>v  HOW   TO   IMPLEMENT?</p>
<ul>
<li>I AM GOING TO DESCRIBE THE BASIC  STEPS WHICH  I  HAVE  FOLLOWED WHILE  IMPLEMENTING CHARACTER DRIVER:</li>
</ul>
<p>–     I started to write the program  using two predefined macros named as module_init (entry_function) and module_exit(exit_function) as entrance point as main() in user space and exit point respectively.In which I have written my own start &amp;  end function. So after executing module_init execution will start from my function where I have to specify the major number and name of our driver, capacity to handle maximum number of device at a time and maximum memory of the driver. The major number identifies the driver associated with the device. I am firstly allocating major number to my driver which is basically a highest possible integer value between 0 to 255 by which our driver will be known in the kernel like other device drivers as stored in /proc/devices file .We can select major number for our driver from previously mentioned path but generally we privilege kernel to select major number because kernel will allocate it dynamically .This can be done with the register_chrdev_region() function call defined in fs.h  which is in kernel library .In current scenario register_allok_chardev_region is in trend to do the errlier mentioned task .This will give the result of 32 bit(12 + 20 bit) at the address as give in first argument of call. After that I have used the first 12 bit i.e major number but i specify my own minor number generally 0 to upward in MKDEV() macro defined in kdev_t.h. After that I have allocated memory to sculldev structure(user defined structure that contain all information of the driver)) &amp; separately initialized all its members as sculldev initialization function .Now used the cdev_init() and cdev_add() to initialize and add the cdev structure for our device which will contains the device specifications. Now I have written separate functions for each ( to create scullQsets structures, create q-sets structures, create quantums)&amp; called these functions from write &amp; read functions of driver modules to perform the desired operations in device.</p>
<p>In order to perform various operations like open, write, read, lseek and close file I have written an application in  user space &amp; mapped it similar kind if file operations (open, write read, llseek, release)that is in my driver program .So i have mapped these system calls in struct file_operations structure with my respective open,write,read,lseek and close functions according to prototype defined in &lt;fs.h&gt; kernel header file that will now handles the application calls instead of drivers of the OS.</p>
<p>But Before doing anything we have to map our allocated memory with the device memory this is done in the open function of driver with</p>
<p>container_of(ptr, type, member) in which first argument is pointer to i_cdev member of struct inode,2nd argument is user defined structure which contains pointer to struct cdev and third argument is pointer to struct cdev.Actually struct cdev is actual representation of the device. Now return of container_of will be starting address of mapped memory that we will use to read and write on device and i store this address in the private_data of the struct file structure defined in fs.h library.</p>
<p>After doing this now i have made my read, write and lseek function compatible with the almost all type of requests from application.In this write function will store the written data in own quantums when write request comes and give back that data according to the read request of application.I have also handled the single multithreaded application.</p>
<p>Now to test this driver we have to compile and insert our module in running kernel dynamically. This is done with command insmod ./modules/program name(without .c).ko  &amp; Compilation of the file should be by Makefile. After completion of work (successful insertion &amp; execution of task) we have to remove our module this is done by command rmmod  program name(without .c).</p>
<p>If every step is correct &amp; written in proper manner then  program will run &amp; it will give desired result otherwise kernel will be crashed.</p>
<p>REMARKS: THERE MAY BE  POSSIBILITY OF ERROR IN SYNTEX, SENTENCES,ARGUMENTS (&amp; SOME-WHAT IN CONCEPTS ALSO ). SO ANY COMMENT, CORRECTION, SUGGESTION  IS CORDIONLY INVITED.</p>
<p>REGARD’S</p>
<p><em>RANA BRIJENDRA SINGH</em></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/rana-brijendra-singh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>facing problems in fedora installation&#8230;&#8230;.</title>
		<link>https://www.emblogic.com/blog/06/facing-problems-in-fedora-installation/</link>
		<comments>https://www.emblogic.com/blog/06/facing-problems-in-fedora-installation/#comments</comments>
		<pubDate>Sun, 02 Jun 2013 12:16:20 +0000</pubDate>
		<dc:creator><![CDATA[ranabrijendra12]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pravjot sir]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=6517</guid>
		<description><![CDATA[sir i m trying to install fedora in my laptop since TWO weeks. i am facing new problems every time but unable to resolve it&#8230; i tried different versions of fedora&#8230;but problem is still same&#8230; ERROR DISCRIPTION&#8211; after completion of &#8230; <a href="https://www.emblogic.com/blog/06/facing-problems-in-fedora-installation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>sir i m trying to install fedora in my  laptop since TWO weeks.  i am facing new problems every time but unable to resolve it&#8230;<br />
i tried different  versions of fedora&#8230;but problem is still same&#8230;<br />
ERROR  DISCRIPTION&#8211;  after completion of packages it shows &#8220;there is an  error in installing boot -loader system  may not be bootable&#8221;<br />
2- some time it shows  an unexpected bug has occured..<br />
remark- windows  7 is working properly &#8230;&#8230;<br />
                                                                        regard&#8217;s<br />
                                                               RANA BRIJENDRA SINGH (E-31)</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/facing-problems-in-fedora-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
