Difference between revisions of "Services API"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 86: Line 86:
 
| appletAE
 
| appletAE
 
| Applet Accessor services
 
| Applet Accessor services
 +
|-
 +
| apm
 +
| ?
 
|
 
|
 
|-
 
|-
Line 107: Line 110:
 
| Task services
 
| Task services
 
|
 
|
 +
|-
 +
| bpc
 +
| ?
 +
|
 
|-
 
|-
 
| bsd:u, bsd:s
 
| bsd:u, bsd:s
 
| Sockets services
 
| Sockets services
 
|
 
|
 +
|-
 +
| btm
 +
| ?
 +
|
 
|-
 
|-
 
| caps:a, caps:c, caps:ss
 
| caps:a, caps:c, caps:ss
Line 119: Line 130:
 
| ETicket services?
 
| ETicket services?
 
|
 
|
 +
|-
 +
| fan
 +
| ?
 +
|
 
|-
 
|-
 
| fatal:u
 
| fatal:u
 
| Fatal Error services
 
| Fatal Error services
 
|
 
|
 +
|-
 +
| fgm
 +
| ?
 +
|
 
|-
 
|-
 
| friend:u, friend:v, friend:m, friend:s, friend:a
 
| friend:u, friend:v, friend:m, friend:s, friend:a
Line 131: Line 150:
 
| [[Filesystem services]]
 
| [[Filesystem services]]
 
|
 
|
 +
|-
 +
| irs
 +
| ?
 +
|
 
|-
 
|-
 
| hid, hid:dbg, hid:sys
 
| hid, hid:dbg, hid:sys
 
| [[HID services]]
 
| [[HID services]]
 
|
 
|
 +
|-
 +
| lbl
 +
| ?
 +
|
 
|-
 
|-
 
| ldn:m
 
| ldn:m
Line 159: Line 186:
 
| Mii services
 
| Mii services
 
|
 
|
 +
|-
 +
| ncm
 +
| ?
 +
|
 
|-
 
|-
 
| nifm:u, nifm:a, nifm:s
 
| nifm:u, nifm:a, nifm:s
Line 179: Line 210:
 
| [[NSD services]]
 
| [[NSD services]]
 
|
 
|
 +
|-
 +
| ntc
 +
| ?
 +
|
 
|-
 
|-
 
| nvdrv:a, nvmemp, mm:u
 
| nvdrv:a, nvmemp, mm:u
 
| [[NV services]]
 
| [[NV services]]
 
|
 
|
 +
|-
 +
| omm
 +
| ?
 +
|
 
|-
 
|-
 
| ovln:rcv, ovln:snd
 
| ovln:rcv, ovln:snd
Line 191: Line 230:
 
| Parental Control services
 
| Parental Control services
 
|
 
|
 +
|-
 +
| pcv
 +
| ?
 +
|
 
|-
 
|-
 
| pdm:ntfy, pdm:qry
 
| pdm:ntfy, pdm:qry
Line 219: Line 262:
 
| SSL services
 
| SSL services
 
|
 
|
 +
|-
 +
| tc
 +
| ?
 +
|
 
|-
 
|-
 
| time:u, time:a, time:s
 
| time:u, time:a, time:s
 
| Time services
 
| Time services
 
|
 
|
 +
|-
 +
| ts
 +
| ?
 +
|
 
|-
 
|-
 
| vi:m, vi:s, vi:u
 
| vi:m, vi:s, vi:u

Revision as of 23:01, 5 June 2017

Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).

Handles for services are retrieved from the service manager port, "sm:". Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.

sm:

Cmd Name
0 #Initialize
1 #GetService
2 #RegisterService
3

Initialize

Word Value
0 0x00000004
1 0x8000000A
2 0x00000001
0-1 Pid
0 "SFCI"
1 0x00000000
2 Always 0.

GetService

Word Value
0 0x00000004
1 0x0000000A
0 "SFCI"
1 0x00000001
2 Service name, zero padded and casted to u64.

RegisterService

Word Value
0 0x00000004
1 0x0000000C
0 "SFCI"
1 0x00000002
2 Service name, zero padded and casted to u64.
3 Max sessions? 32-bit integer.
4 Unknown bool

Service List

Service names Description Notes
acc:u1, acc:su Account services u1: for user 1?
appletAE Applet Accessor services
apm ?
aoc:u AddOn Content services
arp:w ?
audren:u Audio Renderer services
audout:u Audio Out services
bgtc:t, bgtc:sc Task services
bpc ?
bsd:u, bsd:s Sockets services
btm ?
caps:a, caps:c, caps:ss Capture services a: Album, ss: Screenshot
es ETicket services?
fan ?
fatal:u Fatal Error services
fgm ?
friend:u, friend:v, friend:m, friend:s, friend:a Friend services
fsp-srv Filesystem services
irs ?
hid, hid:dbg, hid:sys HID services
lbl ?
ldn:m Local Network Monitor services
ldr:ro, ldr:shel Loader services
lm Log services
lr ?
erpt:c ERPT(?) services
mii:u, mii:e Mii services
ncm ?
nifm:u, nifm:a, nifm:s Network Interface services
nim, nim:shp NIM services shp: eShop
npns:u, npns:s ?
ns:am, ns:su, ns:dev NS Services am: Application Manager, su: System Update
nsd:u, nsd:a NSD services
ntc ?
nvdrv:a, nvmemp, mm:u NV services
omm ?
ovln:rcv, ovln:snd Overlay Notification services
pctl, pctl:a, pctl:s, pctl:r Parental Control services
pcv ?
pdm:ntfy, pdm:qry Play Log services
pl:u Shared Font services
pm:bm, pm:shell Process Manager services
prepo:u, prepo:s, prepo:m, prepo:a Play Report services
set, set:sys Settings services sys: System settings
sfdnsres DNS resolver services
ssl SSL services
tc ?
time:u, time:a, time:s Time services
ts ?
vi:m, vi:s, vi:u Display services